Episode cache is not being cleared after episode changes
Describe the bug
After updating the episode details it's cache is not being cleared. At least while it's in "draft" mode.
This issue is probably a duplicate of #42 (closed). But it seems that the problem wasn't fixed back then or was reintroduced later.
This behavior makes it almost impossible to check if everything looks good before publishing without flushing entire cache from "Settings" or CLI.
I'm not sure if it works for ANY changed field, but I experienced it with description, chapters and some other fields.
First time I thoughts that my chapters.json
file was invalid and spent some time to try to find out what's wrong with it. But the problem wasn't in the file at all.
Steps to reproduce
- Save episode to the database.
- Check how it looks in the preview mode.
- Change something in the episode details.
- Check preview again.
Expected behavior
Episode preview shows changes just made in edit mode.
Actual behavior
Episode preview shows cached version ignoring all changes.
Relevant logs and/or screenshots
Context
- Castopod: 1.12.6 and earlier
- OS: Docker / Linux
Possible fixes
Flush episode page cache on each save.