policies: don't always clear application cache on post_save

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-12-12 20:39:04 +01:00
parent cda4be3d47
commit 5ef385f0bb
1 changed files with 2 additions and 2 deletions

View File

@ -21,5 +21,5 @@ def invalidate_policy_cache(sender, instance, **_):
prefix = f"policy_{binding.policy_binding_uuid.hex}_{binding.policy.pk.hex}*"
total += cache.delete_pattern(prefix)
LOGGER.debug("Invalidating policy cache", policy=instance, keys=total)
# Also delete user application cache
cache.delete_pattern(user_app_cache_key("*"))
# Also delete user application cache
cache.delete_pattern(user_app_cache_key("*"))