Commit 6ee293f3 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Speed optimization ("is" is much faster than "isinstance").

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29696 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a74f7ef7
......@@ -73,8 +73,8 @@ class RamCache(BaseCache):
def get(self, cache_id, scope, default=_MARKER):
cache = self.getCacheStorage()
cache_entry = cache.get((scope, cache_id), default)
if isinstance(cache_entry, CacheEntry):
cache_entry = cache.get((scope, cache_id), _MARKER)
if cache_entry is not _MARKER:
if not cache_entry.isExpired():
#The value is well retrieved from cache storage
cache_entry.markCacheHit()
......
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