https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18821

--- Comment #31 from Kyle M Hall <[email protected]> ---
> What happens? Somehow $session is already undef when you call track. If we
> need to call CGI::Session->new($sessionID) each time, we do not really
> benefit in terms of db access (well: 1 lookup in sessions instead of 1 in
> borrowers).

That would at least be changing from 1 write to 1 read, which is definitely an
improvement, right?

> Is there a different approach? What about using a cache key? (Do we want to
> pollute the cache with keys for every session..)

So you're suggesting storing something like

--
my $cache = Koha::Caches->get_instance();
my $cache_key = "seen-for-session-$borrowernumber";
my $cached = $cache->get_from_cache($cache_key, { unsafe => 1});
unless ( $cached ) {
  $patron->track_login;
  $cache->set_in_cache($cache_key, 1);
}
--

If so, I think that works! Let me know and I'll submit a patch.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to