def cacheObject(self, object, version): """ Caches an object """ path = self._generatePath(object) fileName = self._generateFileName(object.getQuery(), version) MultiLevelCache.cacheObject(self, path, fileName, object)
def cacheObject(self, object, version): """ Caches an object """ path = self._generatePath(object); fileName = self._generateFileName(object.getQuery(), version) MultiLevelCache.cacheObject(self, path, fileName, object)
def __init__(self): MultiLevelCache.__init__(self, 'xml')
def loadObject(self, fnList): """ Load an object from the cache""" return MultiLevelCache.loadObject(self, fnList)
def __init__(self): MultiLevelCache.__init__(self, 'search')
def cacheObject(self, objectId, object): # TODO: Use user IDs, private events MultiLevelCache.cacheObject(self, ['PUBLIC'], objectId, object) self._dirty = False
def loadObject(self, path): # TODO: Use user IDs, private events return MultiLevelCache.loadObject(self, ['PUBLIC', path])
def __init__(self, ttl=datetime.timedelta(minutes=5)): self._ttl = ttl self._dirty = True MultiLevelCache.__init__(self, 'upcoming_events')