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

--- Comment #21 from Jonathan Druart <[email protected]> ---
(In reply to David Cook from comment #18)
> (In reply to Jonathan Druart from comment #15)
> > I think this is the correct approach, what do you think?
> 
> I'm not 100% sure. 
> 
> I find that the code in ./admin/smart-rules.pl and Koha/CirculationsRules.pm
> is very messy.

Let's say all our code is messy and so we don't need to tell it every week,
deal?

> If we clear the cache after each set_rule() call, we'll be calling the
> function ~38 times (so 38 loops) for each add/update/delete in
> ./admin/smart-rules.pl. We should only need to call it 1 time for each CRUD
> operation.

We could add a flag to set_rule to not clear the cache, and clear it from
set_rules. Would that work for you?

> In fact, since we're using the L1 cache and the L1 cache is flushed at the
> end of every HTTP/SIP request, clearing the cache (in
> ./admin/smart-rules.pl) is actually probably totally unnecessary for
> production purposes. 

Seems a good practices to invalided the cache when the value might have
changed. That will prevent bugs in the future.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
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