server/sources/pyrorql.py
changeset 2763 39b42e158249
parent 2665 0c6281487f90
child 3016 5787d1cc8106
equal deleted inserted replaced
2762:b1bb33b37992 2763:39b42e158249
   123                        'default': 0,
   123                        'default': 0,
   124                        'help': _('timestamp of the latest source synchronization.'),
   124                        'help': _('timestamp of the latest source synchronization.'),
   125                        'group': 'sources',
   125                        'group': 'sources',
   126                        }),)
   126                        }),)
   127         register_persistent_options(myoptions)
   127         register_persistent_options(myoptions)
       
   128         self._query_cache = TimedCache(30)
       
   129 
       
   130     def reset_caches(self):
       
   131         """method called during test to reset potential source caches"""
   128         self._query_cache = TimedCache(30)
   132         self._query_cache = TimedCache(30)
   129 
   133 
   130     def last_update_time(self):
   134     def last_update_time(self):
   131         pkey = u'sources.%s.latest-update-time' % self.uri
   135         pkey = u'sources.%s.latest-update-time' % self.uri
   132         rql = 'Any V WHERE X is CWProperty, X value V, X pkey %(k)s'
   136         rql = 'Any V WHERE X is CWProperty, X value V, X pkey %(k)s'