Commit e05dc370 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

remove CacheEntry._cache_hit_count that is not at all used.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29757 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8e6ca9e2
......@@ -52,7 +52,6 @@ class CacheEntry(object):
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):
......@@ -62,11 +61,6 @@ class CacheEntry(object):
"""
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 """
return self.value
......
......@@ -77,7 +77,6 @@ class RamCache(BaseCache):
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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment