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,
|
`persistent`'s SQL backend. Works with PostgreSQL, MySQL,
|
||||||
SQLite.
|
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.
|
* _Frontend_, bindings for your web framework of choice.
|
||||||
Currently we support:
|
Currently we support:
|
||||||
|
|
||||||
|
|||||||
@ -4,12 +4,15 @@
|
|||||||
-- example:
|
-- example:
|
||||||
--
|
--
|
||||||
-- @
|
-- @
|
||||||
-- import Data.Acid
|
-- import Control.Exception (bracket)
|
||||||
-- import Web.ServerSession.Backend.Acid
|
-- import Data.Acid.Local (openLocalState, createCheckpointAndClose)
|
||||||
|
-- import Web.ServerSession.Backend.Acid (AcidStorage(..), emptyState)
|
||||||
--
|
--
|
||||||
-- makeSessionStorage :: IO 'AcidStorage'
|
-- withSessionStorage :: (AcidStorage -> IO a) -> IO a
|
||||||
-- makeSessionStorage =
|
-- withSessionStorage =
|
||||||
-- 'AcidStorage' \<$\> openLocalState 'emptyState'
|
-- bracket
|
||||||
|
-- ('AcidStorage' \<$\> openLocalState 'emptyState')
|
||||||
|
-- createCheckpointAndClose
|
||||||
-- @
|
-- @
|
||||||
module Web.ServerSession.Backend.Acid
|
module Web.ServerSession.Backend.Acid
|
||||||
( AcidStorage(..)
|
( AcidStorage(..)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user