I'm using Django Cache Machine to cache my Django ORM objects. It's a great piece of software. It has immensely reduced the database accesses for nearly all my models -- and it is simple to use.
However, one model is still not being cached: django.contrib.auth.models.User
. Because that is not my own application code, I didn't outfit it with the CachingMixin
that Cache Machine instructions tell you to add to each of your models. So now even though all my own applications' models are being cached, the User
model is not. And so there are still numerous unneccesary database accesses.
What is the best way to eliminate these database accesses? django.contrib.auth.models.User
is not part of my code-base in Git. I would prefer not altering the source code of that class or module at all.