From 927470db724b6211ff059376e02db9ce56552932 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 3 Aug 2022 15:15:49 -0500 Subject: [PATCH] Force cache invalidation when Raw Setting is edited only applies if caching is actually in use --- tailbone/views/settings.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tailbone/views/settings.py b/tailbone/views/settings.py index 6fc0e66f..da797bed 100644 --- a/tailbone/views/settings.py +++ b/tailbone/views/settings.py @@ -80,6 +80,12 @@ class SettingView(MasterView): return not bool(self.feedback.match(setting.name)) return True + def after_edit(self, setting): + # nb. force cache invalidation - normally this happens when a + # setting is saved via app handler, but here that is being + # bypassed and it is saved directly via standard ORM calls + self.rattail_config.beaker_invalidate_setting(setting.name) + def deletable_instance(self, setting): if self.rattail_config.demo(): return not bool(self.feedback.match(setting.name))