[Erp5-report] r24637 - /erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Nov 19 16:05:03 CET 2008


Author: ivan
Date: Wed Nov 19 16:04:52 2008
New Revision: 24637

URL: http://svn.erp5.org?rev=24637&view=rev
Log:
Fix None condition check and set a smaller value for cache key expiration.

Modified:
    erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py

Modified: erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py?rev=24637&r1=24636&r2=24637&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py [utf8] Wed Nov 19 16:04:52 2008
@@ -91,10 +91,10 @@
   def set(self, cache_id, scope, value, cache_duration= None, calculation_time=0):
     cache_storage = self.getCacheStorage()
     cache_id = self.checkAndFixCacheId(cache_id, scope)
-    if not cache_duration:
+    if cache_duration is None:
       ## what should be default cache_duration when None is specified?
-      ## currently when 'None' it means forever so give it  big value of 100 hours
-      cache_duration = 360000
+      ## currently when 'None' it means forever so give it  big value of 24 hours
+      cache_duration = 86400
     cache_entry = CacheEntry(value, cache_duration, calculation_time)
     cache_storage.set(cache_id, cache_entry, cache_duration)
     #self.markCacheMiss()




More information about the Erp5-report mailing list