From 980f92531797f01ed61f5ccb16a1e98b561cc1b1 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 26 Dec 2012 19:04:45 +0200 Subject: [PATCH] Update scaffold to use newer date cache code --- yesod/hsfiles/mongo.hsfiles | 6 ++++-- yesod/hsfiles/mysql.hsfiles | 6 ++++-- yesod/hsfiles/postgres.hsfiles | 6 ++++-- yesod/hsfiles/simple.hsfiles | 6 ++++-- yesod/hsfiles/sqlite.hsfiles | 6 ++++-- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/yesod/hsfiles/mongo.hsfiles b/yesod/hsfiles/mongo.hsfiles index fb22b601..0e261eac 100644 --- a/yesod/hsfiles/mongo.hsfiles +++ b/yesod/hsfiles/mongo.hsfiles @@ -139,7 +139,9 @@ instance Yesod App where -- default session idle timeout is 120 minutes makeSessionBackend _ = do key <- getKey "config/client_session_key.aes" - return . Just $ clientSessionBackend key 120 + let timeout = 120 * 60 -- 120 minutes + (getCachedDate, _closeDateCache) <- clientSessionDateCacher timeout + return . Just $ clientSessionBackend2 key getCachedDate defaultLayout widget = do master <- getYesod @@ -370,7 +372,7 @@ library build-depends: base >= 4 && < 5 -- , yesod-platform >= 1.1 && < 1.2 , yesod >= 1.1.5 && < 1.2 - , yesod-core >= 1.1.5 && < 1.2 + , yesod-core >= 1.1.7 && < 1.2 , yesod-auth >= 1.1 && < 1.2 , yesod-static >= 1.1 && < 1.2 , yesod-default >= 1.1 && < 1.2 diff --git a/yesod/hsfiles/mysql.hsfiles b/yesod/hsfiles/mysql.hsfiles index 4a3d9d62..871a7cc7 100644 --- a/yesod/hsfiles/mysql.hsfiles +++ b/yesod/hsfiles/mysql.hsfiles @@ -141,7 +141,9 @@ instance Yesod App where -- default session idle timeout is 120 minutes makeSessionBackend _ = do key <- getKey "config/client_session_key.aes" - return . Just $ clientSessionBackend key 120 + let timeout = 120 * 60 -- 120 minutes + (getCachedDate, _closeDateCache) <- clientSessionDateCacher timeout + return . Just $ clientSessionBackend2 key getCachedDate defaultLayout widget = do master <- getYesod @@ -368,7 +370,7 @@ library build-depends: base >= 4 && < 5 -- , yesod-platform >= 1.1 && < 1.2 , yesod >= 1.1.5 && < 1.2 - , yesod-core >= 1.1.5 && < 1.2 + , yesod-core >= 1.1.7 && < 1.2 , yesod-auth >= 1.1 && < 1.2 , yesod-static >= 1.1 && < 1.2 , yesod-default >= 1.1 && < 1.2 diff --git a/yesod/hsfiles/postgres.hsfiles b/yesod/hsfiles/postgres.hsfiles index 1eef35ff..132526f2 100644 --- a/yesod/hsfiles/postgres.hsfiles +++ b/yesod/hsfiles/postgres.hsfiles @@ -141,7 +141,9 @@ instance Yesod App where -- default session idle timeout is 120 minutes makeSessionBackend _ = do key <- getKey "config/client_session_key.aes" - return . Just $ clientSessionBackend key 120 + let timeout = 120 * 60 -- 120 minutes + (getCachedDate, _closeDateCache) <- clientSessionDateCacher timeout + return . Just $ clientSessionBackend2 key getCachedDate defaultLayout widget = do master <- getYesod @@ -368,7 +370,7 @@ library build-depends: base >= 4 && < 5 -- , yesod-platform >= 1.1 && < 1.2 , yesod >= 1.1.5 && < 1.2 - , yesod-core >= 1.1.5 && < 1.2 + , yesod-core >= 1.1.7 && < 1.2 , yesod-auth >= 1.1 && < 1.2 , yesod-static >= 1.1 && < 1.2 , yesod-default >= 1.1 && < 1.2 diff --git a/yesod/hsfiles/simple.hsfiles b/yesod/hsfiles/simple.hsfiles index d2abbe12..33db0087 100644 --- a/yesod/hsfiles/simple.hsfiles +++ b/yesod/hsfiles/simple.hsfiles @@ -124,7 +124,9 @@ instance Yesod App where -- default session idle timeout is 120 minutes makeSessionBackend _ = do key <- getKey "config/client_session_key.aes" - return . Just $ clientSessionBackend key 120 + let timeout = 120 * 60 -- 120 minutes + (getCachedDate, _closeDateCache) <- clientSessionDateCacher timeout + return . Just $ clientSessionBackend2 key getCachedDate defaultLayout widget = do master <- getYesod @@ -300,7 +302,7 @@ library build-depends: base >= 4 && < 5 -- , yesod-platform >= 1.1 && < 1.2 , yesod >= 1.1.5 && < 1.2 - , yesod-core >= 1.1.5 && < 1.2 + , yesod-core >= 1.1.7 && < 1.2 , yesod-static >= 1.1 && < 1.2 , yesod-default >= 1.1 && < 1.2 , yesod-form >= 1.1 && < 1.3 diff --git a/yesod/hsfiles/sqlite.hsfiles b/yesod/hsfiles/sqlite.hsfiles index 5feb86b1..3e0e5e04 100644 --- a/yesod/hsfiles/sqlite.hsfiles +++ b/yesod/hsfiles/sqlite.hsfiles @@ -141,7 +141,9 @@ instance Yesod App where -- default session idle timeout is 120 minutes makeSessionBackend _ = do key <- getKey "config/client_session_key.aes" - return . Just $ clientSessionBackend key 120 + let timeout = 120 * 60 -- 120 minutes + (getCachedDate, _closeDateCache) <- clientSessionDateCacher timeout + return . Just $ clientSessionBackend2 key getCachedDate defaultLayout widget = do master <- getYesod @@ -368,7 +370,7 @@ library build-depends: base >= 4 && < 5 -- , yesod-platform >= 1.1 && < 1.2 , yesod >= 1.1.5 && < 1.2 - , yesod-core >= 1.1.5 && < 1.2 + , yesod-core >= 1.1.7 && < 1.2 , yesod-auth >= 1.1 && < 1.2 , yesod-static >= 1.1 && < 1.2 , yesod-default >= 1.1 && < 1.2