fix: invalidate request level cache on settings update instead of turning off cache for requests

This commit is contained in:
Andrii V 2025-08-08 18:07:27 +02:00
parent ae72335b5d
commit 5f4d428379
3 changed files with 12 additions and 3 deletions

View file

@ -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()