Merge pull request #68 from eriktelepovsky/master
Fixes cache in CachalotPanel, Version 1.4.2
This commit is contained in:
commit
83cee881d2
|
@ -1,6 +1,11 @@
|
|||
What’s new in django-cachalot?
|
||||
==============================
|
||||
|
||||
1.4.2
|
||||
-----
|
||||
|
||||
- Fixes cache in CachalotPanel
|
||||
|
||||
1.4.1
|
||||
-----
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Disk INTEL SSDSC2CW06
|
|||
Linux distribution Ubuntu 16.04 xenial
|
||||
Python 3.5.2
|
||||
Django 1.10.2
|
||||
cachalot 1.4.1
|
||||
cachalot 1.4.2
|
||||
sqlite 3.11.0
|
||||
PostgreSQL 9.6.0
|
||||
MySQL 5.7.15
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
VERSION = (1, 4, 1)
|
||||
VERSION = (1, 4, 2)
|
||||
__version__ = '.'.join(map(str, VERSION))
|
||||
|
||||
default_app_config = 'cachalot.apps.CachalotConfig'
|
||||
|
|
|
@ -7,10 +7,10 @@ from datetime import datetime
|
|||
from debug_toolbar.panels import Panel
|
||||
from django.apps import apps
|
||||
from django.conf import settings
|
||||
from django.core.cache import cache
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.timesince import timesince
|
||||
|
||||
from .cache import cachalot_caches
|
||||
from .utils import _get_table_cache_key
|
||||
|
||||
|
||||
|
@ -43,6 +43,7 @@ class CachalotPanel(Panel):
|
|||
def collect_invalidations(self):
|
||||
models = apps.get_models()
|
||||
data = defaultdict(list)
|
||||
cache = cachalot_caches.get_cache()
|
||||
for db_alias in settings.DATABASES:
|
||||
model_cache_keys = dict(
|
||||
[(_get_table_cache_key(db_alias, model._meta.db_table), model)
|
||||
|
|
Loading…
Reference in New Issue