[Erp5-report] r29753 - /erp5/trunk/products/ERP5Type/CachePlugins/BaseCache.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Oct 16 13:43:38 CEST 2009
Author: nicolas
Date: Fri Oct 16 13:43:35 2009
New Revision: 29753
URL: http://svn.erp5.org?rev=29753&view=rev
Log:
revert r29692; 0 means no expiration
Modified:
erp5/trunk/products/ERP5Type/CachePlugins/BaseCache.py
Modified: erp5/trunk/products/ERP5Type/CachePlugins/BaseCache.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/CachePlugins/BaseCache.py?rev=29753&r1=29752&r2=29753&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/CachePlugins/BaseCache.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/CachePlugins/BaseCache.py [utf8] Fri Oct 16 13:43:35 2009
@@ -49,7 +49,7 @@
def __init__(self, value, cache_duration=None, calculation_time=0):
self.value = value
if cache_duration in (None, 0):
- self.expires_at = None
+ self.expires_at = cache_duration
else:
self.expires_at = time() + cache_duration
self._cache_hit_count = 0
@@ -60,7 +60,7 @@
- None means allways expire
- 0 means never expire
"""
- return self.expires_at is None or self.expires_at < time()
+ return self.expires_at is None or self.expires_at != 0 and self.expires_at < time()
def markCacheHit(self, delta=1):
""" mark a read to this cache entry """
More information about the Erp5-report
mailing list