From 9f342387ccdbf24bbf78a6f374738607de6de974 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 28 Sep 2012 12:42:07 +0200 Subject: [PATCH 1/1] Clear cache on audiobook save. --- apps/catalogue/models/listeners.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/catalogue/models/listeners.py b/apps/catalogue/models/listeners.py index 7e034a1c6..e1299ab85 100644 --- a/apps/catalogue/models/listeners.py +++ b/apps/catalogue/models/listeners.py @@ -44,6 +44,7 @@ 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') elif sender == Collection: permanent_cache.delete('catalogue.collection:%s' % instance.slug) post_save.connect(_post_save_handler) @@ -51,7 +52,7 @@ post_save.connect(_post_save_handler) def post_publish(sender, **kwargs): permanent_cache.delete_many(['catalogue.book_list', - 'catalogue.audiobook_list', 'catalogue.daisy_list']) + 'catalogue.daisy_list']) Book.published.connect(post_publish) -- 2.20.1