Add acid-state to main README, include better example of usage.

This commit is contained in:
Felipe Lessa 2015-05-25 22:09:25 -03:00
parent 591a525f53
commit c2bd20cd56
2 changed files with 13 additions and 5 deletions

View File

@ -17,6 +17,11 @@ to be paired up with two companion packages:
`persistent`'s SQL backend. Works with PostgreSQL, MySQL,
SQLite.
* `serversession-backend-acid-state`: Storage backend using
`acid-state`. This backend keeps sessions in memory but
provides ACID guarantees using a transaction log. It can
also be used without durability as a memory-only backend.
* _Frontend_, bindings for your web framework of choice.
Currently we support:

View File

@ -4,12 +4,15 @@
-- example:
--
-- @
-- import Data.Acid
-- import Web.ServerSession.Backend.Acid
-- import Control.Exception (bracket)
-- import Data.Acid.Local (openLocalState, createCheckpointAndClose)
-- import Web.ServerSession.Backend.Acid (AcidStorage(..), emptyState)
--
-- makeSessionStorage :: IO 'AcidStorage'
-- makeSessionStorage =
-- 'AcidStorage' \<$\> openLocalState 'emptyState'
-- withSessionStorage :: (AcidStorage -> IO a) -> IO a
-- withSessionStorage =
-- bracket
-- ('AcidStorage' \<$\> openLocalState 'emptyState')
-- createCheckpointAndClose
-- @
module Web.ServerSession.Backend.Acid
( AcidStorage(..)