diff --git a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Run.pm b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Run.pm index bf6e7844b..1b06998fb 100644 --- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Run.pm +++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Run.pm @@ -826,10 +826,13 @@ sub localUnlog { if ( $id //= $class->fetchId($req) ) { # Delete local cache - if ( $class->tsv->{refLocalStorage} - and $class->tsv->{refLocalStorage}->get($id) ) - { - $class->tsv->{refLocalStorage}->remove($id); + if ( $class->tsv->{sessionCacheModule} ) { + my $module = $class->tsv->{sessionCacheModule}; + my $options = $class->tsv->{sessionCacheOptions}; + my $cache = $module->new($options); + if ( $cache->get($id) ) { + $cache->remove($id); + } } } }