[Koha-patches] [PATCH] Bug 5408 - Refactor GetIssuingRule and GetLoanLength

LAURENT Henri-Damien henridamien.laurent at biblibre.com
Wed Nov 17 18:33:09 CET 2010


Le 16/11/2010 19:20, Clay Fouts a écrit :
> What's the status of merging this development? Is anyone working on it?
Already answered by chris
> My implementation of that particular function is more readable (and less
> DB intensive in many cases), 
Maybe the first time... But since Memoize is used, it may not be as DB
intensive as you think.
One thing to improve that we havenot done would be to flush the memoized
GetIssuingRules whenever an issuing rule is edited so that it can be
refreshed.
Another thing would be to use Memoize::Memcached rather that Memoize...
Would be quite easy to do though. (other Koha.pm Memoize usage  we did
is done that way).

> but your branch has the advantage in terms
> of being more complete and fully separating out the issuing rules
> concerns into their own module. What remains to be done?
Apart from the thing I previously said, it is in production and works
quite well and efficiently.
Yes SQLHelper is quite Mysql demanding, but it was meant to be a first
step to DBIx::Class and I thought that we could also store the DB
structure in a yaml file so that we could get rid of columns.def and
have translations of field description in an authoritative file.
I have had no time to investigate in DBIx::Class::Schema to see if it
would be able to read and process from a YAML file. If anyone is willing
to tell his mind about that idea.
The fact is that columns.def was good in order to map columns and their
description. But it is not coped in the translation process. And we
already have some way to process some YAML file.... And a YAML file is
quick to parse. So naturally, I think it could be a good idea to store
those information in such a structure.

-- 
Henri-Damien LAURENT


More information about the Koha-patches mailing list