From e9673d40117e6785680fb7f1d3ce9363bcd2f078 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 1 Oct 2012 10:54:04 +0200 Subject: [PATCH] DAISY cache fix --- apps/catalogue/models/listeners.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/catalogue/models/listeners.py b/apps/catalogue/models/listeners.py index e1299ab85..93ad2d788 100644 --- a/apps/catalogue/models/listeners.py +++ b/apps/catalogue/models/listeners.py @@ -44,15 +44,15 @@ def _post_save_handler(sender, instance, **kwargs): """ refresh all the short_html stuff on BookMedia update """ if sender == BookMedia: instance.book.save() - permanent_cache.delete('catalogue.audiobook_list') + permanent_cache.delete_many([ + 'catalogue.audiobook_list', 'catalogue.daisy_list']) elif sender == Collection: permanent_cache.delete('catalogue.collection:%s' % instance.slug) post_save.connect(_post_save_handler) def post_publish(sender, **kwargs): - permanent_cache.delete_many(['catalogue.book_list', - 'catalogue.daisy_list']) + permanent_cache.delete('catalogue.book_list') Book.published.connect(post_publish) -- 2.20.1