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

David Cook <dc...@prosentient.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dc...@prosentient.com.au

--- Comment #3 from David Cook <dc...@prosentient.com.au> ---
I like the idea of this one, although I wonder if the cache could be more
generalizable and have less repeated code.

--

Koha::Object could create $self->{_cache} = {} in the new() constructor. 

Then Koha::Patron could use a cache related function at the start and end of
"is_expired" and "has_overdues":

return $self->cache({ key => 'is_expired' }) if $param->{cache};

$param->{cache} ? $self->cache({ key => 'is_expired', value => $is_expired }) :
$self->cache({ key => 'is_expired', value => undef });

Not saying it has to... but just a thought to make things easier to read, test,
and maintain.

--

I wonder if Koha::Cache::Memory::Lite could be used instead as well. 


--

Overall, I'm a big fan of caching and not re-fetching data that we've already
fetched.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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