fix: invalidate request level cache on settings update instead of turning off cache for requests
This commit is contained in:
parent
ae72335b5d
commit
5f4d428379
3 changed files with 12 additions and 3 deletions
|
|
@ -222,6 +222,12 @@ class SettingsModel(BaseModel):
|
|||
# we use hard cleanup if invalidation is sent
|
||||
rc_cache.clear_cache_namespace(region, namespace_key, method=rc_cache.CLEAR_DELETE)
|
||||
|
||||
# Also clear request-level cache
|
||||
request = get_current_request()
|
||||
if request and hasattr(request, "call_context") and hasattr(request.call_context, "rc_config"):
|
||||
log.debug("Clearing request-level settings cache")
|
||||
delattr(request.call_context, "rc_config")
|
||||
|
||||
def get_cache_call_method(self, cache=True):
|
||||
region, cache_key = self.get_cache_region()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue