diff --git a/mini_fiction/bl/stories.py b/mini_fiction/bl/stories.py index 84404ef3..8004c589 100644 --- a/mini_fiction/bl/stories.py +++ b/mini_fiction/bl/stories.py @@ -1800,6 +1800,12 @@ def update(self, editor, data, minor=False): flags=flags, ) + # TODO: перенести всё кэширование из models куда-то сюда + if 'notes' in edited_data: + current_app.cache.delete(f"chapter_notes_html_{chapter.id}") + if chapter_text_diff: + current_app.cache.delete(f"chapter_text_html_{chapter.id}") + later(current_app.tasks['sphinx_update_chapter'].delay, chapter.id) return chapter