Bug 15504: (follow-up) Rename cache key
I agree, it's better to use borrowernumber for the cache key and I also take the oportunity to rename it to more clearly reflect the function (it's no longer 'login' only, it's now 'activity') Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
66b6c3e936
commit
a377be6afe
2 changed files with 2 additions and 2 deletions
|
@ -1186,7 +1186,7 @@ sub update_lastseen {
|
|||
return $self unless $tracked_activities->{$activity};
|
||||
|
||||
my $cache = Koha::Caches->get_instance();
|
||||
my $cache_key = "track_login_" . $self->userid;
|
||||
my $cache_key = "track_activity_" . $self->borrowernumber;
|
||||
my $cached = $cache->get_from_cache($cache_key);
|
||||
my $now = dt_from_string();
|
||||
return if $cached && $cached eq $now->ymd;
|
||||
|
|
|
@ -1964,7 +1964,7 @@ subtest 'update_lastseen tests' => sub {
|
|||
$patron->store();
|
||||
|
||||
my $cache = Koha::Caches->get_instance();
|
||||
my $cache_key = "track_login_" . $patron->userid;
|
||||
my $cache_key = "track_activity_" . $patron->borrowernumber;
|
||||
$cache->clear_from_cache($cache_key);
|
||||
|
||||
t::lib::Mocks::mock_preference( 'TrackLastPatronActivity', '1' );
|
||||
|
|
Loading…
Reference in a new issue