From: Radek Czajka Date: Mon, 1 Oct 2012 08:54:04 +0000 (+0200) Subject: DAISY cache fix X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/e9673d40117e6785680fb7f1d3ce9363bcd2f078?ds=inline DAISY cache fix --- 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)