flows: also clear cache when deleting bindings

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-10-20 15:25:38 +02:00
parent 535f2eb27e
commit 621e7f564a
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,6 @@
"""authentik flow signals"""
from django.core.cache import cache
from django.db.models.signals import post_save
from django.db.models.signals import post_save, pre_delete
from django.dispatch import receiver
from structlog.stdlib import get_logger
@ -15,6 +15,7 @@ def delete_cache_prefix(prefix: str) -> int:
@receiver(post_save)
@receiver(pre_delete)
# pylint: disable=unused-argument
def invalidate_flow_cache(sender, instance, **_):
"""Invalidate flow cache when flow is updated"""