Reputation: 3652
I'm using Cache Machine to cache QuerySets which involves adding this to your model:
class MyModel(CachingMixin, models.Model):
objects = CachingManager()
How can I apply this caching to Models I don't have access to? e.g. User or third-party modules.
Upvotes: 1
Views: 270
Reputation: 5249
Use a proxy model for the job. Inherit by 3rd party model, overwrite objects
and use this class instead of an original one.
Upvotes: 2