def invalidate(self, key): cache.delete(_hash(key))
def get(self, key, default=None): cached = cache.get(_hash(key)) return cached if cached is not None else default
def set(self, key, value, expire=300): self.cache.set(_hash(key), value, expire)
def set(self, key, value, timeout=300): cache.set(_hash(key), value, timeout)
def set(self, key, value): self.cache.set(_hash(key), value)