django/tests/cache/closeable_cache.py

13 lines
226 B
Python

from django.core.cache.backends.locmem import LocMemCache
class CloseHookMixin(object):
closed = False
def close(self, **kwargs):
self.closed = True
class CacheClass(CloseHookMixin, LocMemCache):
pass