[CWCache] yet another bugfix in cwcache: proper initalization of Cache.creation_date stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Wed, 10 Jun 2009 23:29:37 +0200
branchstable
changeset 2099 0cba78f4fa12
parent 2098 13aab3775af7
child 2100 89b825cdec74
[CWCache] yet another bugfix in cwcache: proper initalization of Cache.creation_date
appobject.py
--- a/appobject.py	Wed Jun 10 21:02:21 2009 +0200
+++ b/appobject.py	Wed Jun 10 23:29:37 2009 +0200
@@ -25,8 +25,9 @@
 class Cache(dict):
     def __init__(self):
         super(Cache, self).__init__()
-        self.cache_creation_date = None
-        self.latest_cache_lookup = datetime.now()
+        _now = datetime.now()
+        self.cache_creation_date = _now
+        self.latest_cache_lookup = _now
 
 CACHE_REGISTRY = {}