Well, since we have database on the same computer as game server, could remove caching, but I just set expiration time to 10 minutes
authorunc0rr
Sat, 30 Jun 2012 00:34:51 +0400
changeset 7331 0e50456d652c
parent 7329 92b6d8ae99e4
child 7333 520a16a14747
Well, since we have database on the same computer as game server, could remove caching, but I just set expiration time to 10 minutes
gameServer/OfficialServer/DBInteraction.hs
--- a/gameServer/OfficialServer/DBInteraction.hs	Sat Jun 30 00:20:01 2012 +0400
+++ b/gameServer/OfficialServer/DBInteraction.hs	Sat Jun 30 00:34:51 2012 +0400
@@ -60,7 +60,7 @@
         CheckAccount clId clUid clNick _ -> do
             let cacheEntry = clNick `Map.lookup` accountsCache
             currentTime <- getCurrentTime
-            if (isNothing cacheEntry) || (currentTime `diffUTCTime` (fst . fromJust) cacheEntry > 2 * 24 * 60 * 60) then
+            if (isNothing cacheEntry) || (currentTime `diffUTCTime` (fst . fromJust) cacheEntry > 10 * 60) then
                 do
                     SIO.hPutStrLn hIn $ show q
                     hFlush hIn