From bd7f6f60e8d7eb53a6aba86507f9b1abbd21a07f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 14 Jun 2010 14:24:33 +0200 Subject: [PATCH] Fixed caching of LDAP results --- PcfAnnuaire.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PcfAnnuaire.py b/PcfAnnuaire.py index 701a7f3..2d8f354 100644 --- a/PcfAnnuaire.py +++ b/PcfAnnuaire.py @@ -55,7 +55,7 @@ def cache_key(method, 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) + return '%s_%s' % (hash(self), (int(time.time()) / 300)) class PcfAnnuaire(BaseContent):