django-cache-manager
django-cache-manager copied to clipboard
No support for custom querysets
If a custom queryset is used by a manager, this is not available to the cache. For Django 1.10 at least, changing CacheManager.get_queryset() to:
def get_queryset(self):
class_name = 'CustomCachingQuerySet'
return type(class_name, (CachingQuerySet, self._queryset_class), {})(
model=self.model, using=self._db)
and removing QuerySet from the superclasses of CachingQuerySet, means that the tests pass and the cached queryset has the methods of the custom queryset.
Is this worth working up a pull request for?