Fix cache remove on logout (#2387)

This commit is contained in:
Maxime Besson 2020-11-17 10:47:55 +01:00
parent 66eb7efd67
commit 8756a2dd68

View File

@ -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);
}
}
}
}