Switch to new yesod clientSessionBacked2 for better performance

This commit is contained in:
Marko Kocic 2013-04-04 14:25:14 +00:00
parent f5306d720d
commit 2cd0a9c9c0

View File

@ -80,7 +80,9 @@ instance Yesod App where
-- default session idle timeout is 120 minutes
makeSessionBackend _ = do
key <- getKey ".hledger-web_client_session_key.aes"
return . Just $ clientSessionBackend key 120
let timeout = fromIntegral (120 * 60 :: Int) -- 120 minutes
(getCachedDate, _closeDateCacher) <- clientSessionDateCacher timeout
return . Just $ clientSessionBackend2 key getCachedDate
defaultLayout widget = do
master <- getYesod