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

Clay Fouts cfouts at liblime.com
Mon Nov 15 17:45:08 CET 2010


Well, that's a much larger project since AFAICT all the issuingrules table
mutations come from directly within smart-rules.pl. So all that code needs
to me moved into C4::Circ.

As is, there's no actual freshness issue since the cache-enabled functions
are not used from within any script that also mutates the data. That
cache-reset function is there as a reminder to use it when there's further
normalization to the data layer.

Clay


On Mon, Nov 15, 2010 at 1:23 AM, Chris Cormack <chrisc at catalyst.net.nz>wrote:

> * Clay Fouts (cfouts at liblime.com) wrote:
> > This collapses the series of queries within GetIssuingRule into a single
> query,
> > the result of which is cached for future uses. Also refactors
> GetLoanLength to
> > call GetIssuingRule instead of submitting its own queries. The purpose of
> this
> > is to simplify and optimize the code. The API and behavior remain
> unchanged.
> Hi Clay
>
> I like the idea, is the plan to send a follow up patch so that when an
> issuing rule is changed, we clear the cached data?
>
>
> Chris
>
> --
> Chris Cormack
> Catalyst IT Ltd.
> +64 4 803 2238
> PO Box 11-053, Manners St, Wellington 6142, New Zealand
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkzg/CsACgkQZgbcHEvgMLNJfwCgngNUhONZdWqksqDGmTPZWwXx
> SCsAmwWEsfutnmbQoRTP6E5+UeTFpygm
> =UmAX
> -----END PGP SIGNATURE-----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20101115/2711f95d/attachment.htm>


More information about the Koha-patches mailing list