Add acid-state to main README, include better example of usage.
This commit is contained in:
parent
591a525f53
commit
c2bd20cd56
@ -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:
|
||||
|
||||
|
||||
@ -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(..)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user