# HG changeset patch # User Sylvain Thénault # Date 1250002970 -7200 # Node ID 39b42e158249ca2a1f7b36c5b215b84e50015aa6 # Parent b1bb33b37992d101dd207cc2b7a26773901a2312 [ms] proper reset cache on external source diff -r b1bb33b37992 -r 39b42e158249 server/sources/ldapuser.py --- a/server/sources/ldapuser.py Tue Aug 11 12:21:45 2009 +0200 +++ b/server/sources/ldapuser.py Tue Aug 11 17:02:50 2009 +0200 @@ -181,6 +181,7 @@ def reset_caches(self): """method called during test to reset potential source caches""" + self._cache = {} self._query_cache = TimedCache(2*60) def init(self): diff -r b1bb33b37992 -r 39b42e158249 server/sources/pyrorql.py --- a/server/sources/pyrorql.py Tue Aug 11 12:21:45 2009 +0200 +++ b/server/sources/pyrorql.py Tue Aug 11 17:02:50 2009 +0200 @@ -127,6 +127,10 @@ register_persistent_options(myoptions) self._query_cache = TimedCache(30) + def reset_caches(self): + """method called during test to reset potential source caches""" + self._query_cache = TimedCache(30) + def last_update_time(self): pkey = u'sources.%s.latest-update-time' % self.uri rql = 'Any V WHERE X is CWProperty, X value V, X pkey %(k)s'