Skip to content

Instantly share code, notes, and snippets.

@shazow
Created October 21, 2013 21:21
Show Gist options
  • Save shazow/7091224 to your computer and use it in GitHub Desktop.
Save shazow/7091224 to your computer and use it in GitHub Desktop.
Disabled backend for dogpile.cache, useful for testing.
from dogpile.cache.api import CacheBackend, NO_VALUE
class DisabledBackend(CacheBackend):
def __init__(self, arguments):
pass
def get(self, key):
return NO_VALUE
def set(self, key, value):
pass
def delete(self, key):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment