[Erp5-report] r29757 - in /erp5/trunk/products/ERP5Type/CachePlugins: BaseCache.py RamCache.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Oct 16 14:07:26 CEST 2009
Author: kazuhiko
Date: Fri Oct 16 14:07:24 2009
New Revision: 29757
URL: http://svn.erp5.org?rev=29757&view=rev
Log:
remove CacheEntry._cache_hit_count that is not at all used.
Modified:
erp5/trunk/products/ERP5Type/CachePlugins/BaseCache.py
erp5/trunk/products/ERP5Type/CachePlugins/RamCache.py
Modified: erp5/trunk/products/ERP5Type/CachePlugins/BaseCache.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/CachePlugins/BaseCache.py?rev=29757&r1=29756&r2=29757&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/CachePlugins/BaseCache.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/CachePlugins/BaseCache.py [utf8] Fri Oct 16 14:07:24 2009
@@ -52,7 +52,6 @@
self.expires_at = cache_duration
else:
self.expires_at = time() + cache_duration
- self._cache_hit_count = 0
self.calculation_time = calculation_time
def isExpired(self):
@@ -61,11 +60,6 @@
- 0 means never expire
"""
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 """
- if ACTIVATE_TRACKING:
- self._cache_hit_count = self._cache_hit_count + delta
def getValue(self):
""" return cached value """
Modified: erp5/trunk/products/ERP5Type/CachePlugins/RamCache.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/CachePlugins/RamCache.py?rev=29757&r1=29756&r2=29757&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/CachePlugins/RamCache.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/CachePlugins/RamCache.py [utf8] Fri Oct 16 14:07:24 2009
@@ -77,7 +77,6 @@
if cache_entry is not _MARKER:
if not cache_entry.isExpired():
#The value is well retrieved from cache storage
- cache_entry.markCacheHit()
self.markCacheHit()
return cache_entry
else:
More information about the Erp5-report
mailing list