diff --git a/authentik/admin/views/overview.py b/authentik/admin/views/overview.py index 400e47206..dd9d78e17 100644 --- a/authentik/admin/views/overview.py +++ b/authentik/admin/views/overview.py @@ -28,7 +28,7 @@ class PolicyCacheClearView(AdminRequiredMixin, SuccessMessageMixin, FormView): cache.delete_many(keys) LOGGER.debug("Cleared Policy cache", keys=len(keys)) # Also delete user application cache - keys = user_app_cache_key("*") + keys = cache.keys(user_app_cache_key("*")) cache.delete_many(keys) return super().post(request, *args, **kwargs) diff --git a/authentik/policies/signals.py b/authentik/policies/signals.py index 29f23d8ba..3fabc7202 100644 --- a/authentik/policies/signals.py +++ b/authentik/policies/signals.py @@ -26,5 +26,5 @@ def invalidate_policy_cache(sender, instance, **_): cache.delete_many(keys) LOGGER.debug("Invalidating policy cache", policy=instance, keys=total) # Also delete user application cache - keys = user_app_cache_key("*") + keys = cache.keys(user_app_cache_key("*")) cache.delete_many(keys)