append time to ldap cache key

This commit is contained in:
Frédéric Péters 2010-05-25 15:34:39 +02:00
parent b831bdafaf
commit 63b5f8305d
1 changed files with 4 additions and 1 deletions

View File

@ -52,7 +52,10 @@ class PcfAnnuaireService:
pass
def cache_key(method, self):
return hash(self)
# append time, so old entries do not get returned forever; (they will still
# get removed as stale entries are automatically removed after 3 days)
# (cf plone/memoize/volatile.py)
return hash(self) + repr(int(time.time()) / 300)
class PcfAnnuaire(BaseContent):