Fixes cache in CachalotPanel, Version 1.4.2

This commit is contained in:
Erik Telepovský 2016-11-22 15:09:39 +01:00
parent a302f6b77a
commit 2cf0d65994
4 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,11 @@
Whats new in django-cachalot?
==============================
1.4.2
-----
- Fixes cache in CachalotPanel
1.4.1
-----

View File

@ -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

View File

@ -1,4 +1,4 @@
VERSION = (1, 4, 1)
VERSION = (1, 4, 2)
__version__ = '.'.join(map(str, VERSION))
default_app_config = 'cachalot.apps.CachalotConfig'

View File

@ -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)