def __init__(self): super(KVStore, self).__init__() try: self.cache = get_cache(settings.THUMBNAIL_CACHE) except InvalidCacheBackendError: self.cache = cache
def cache(self): try: kv_cache = get_cache(settings.THUMBNAIL_CACHE) except InvalidCacheBackendError: kv_cache = cache return kv_cache