Skip to content

Instantly share code, notes, and snippets.

@Bpless
Created December 6, 2011 19:22
Show Gist options
  • Save Bpless/1439534 to your computer and use it in GitHub Desktop.
Save Bpless/1439534 to your computer and use it in GitHub Desktop.
from django.db import models
from caching.base import CachingManager, CachingMixin
class CacheIt(CachingMixin, models.Model):
key_data = models.CharField(max_length=30)
related_stuff = models.ForeignKey('related.RelatedStuff')
objects = CachingManager()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment