Skip to content

Instantly share code, notes, and snippets.

@Bpless
Created December 7, 2011 17:18
Show Gist options
  • Save Bpless/1443660 to your computer and use it in GitHub Desktop.
Save Bpless/1443660 to your computer and use it in GitHub Desktop.
OurModel.objects.all().from_cache()  # Will always hit the cache

OurModel.objects.all()       # Will only hit the cache if  __init__() method sets _retrieve_from_cache to True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment