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

--- Comment #13 from Jonathan Druart <[email protected]> ---
(In reply to David Cook from comment #11)
> Comment on attachment 134209 [details] [review]
> Bug 29623: Cache circulation rules
> 
> Review of attachment 134209 [details] [review]:
> -----------------------------------------------------------------
> 
> ::: Koha/CirculationRules.pm
> @@ +379,5 @@
> > +    my $memory_cache = Koha::Cache::Memory::Lite->get_instance;
> > +    my $cache_key = sprintf "CircRules:%s:%s:%s:%s", $rule_name // q{},
> > +      $categorycode // q{}, $branchcode // q{}, $itemtype // q{};
> > +
> > +    Koha::Cache::Memory::Lite->flush();
> 
> It looks like the $memory_cache and $cache_key variables are initialised but
> unused?

Looks like a leftover. I think I first put the code there then moved it into
the other method.

> @@ +410,4 @@
> >          push( @$rule_objects, $rule_object );
> >      }
> >  
> > +    Koha::Cache::Memory::Lite->flush();
> 
> Is this necessary since the cache should be cleared at the end of the HTTP
> request? Or is this to provide for cases where the method is called outside
> a HTTP context?

Hum, that's bad indeed.
I think we need to flush (as the cache contains old values now), or update the
cache's values, but we shouldn't flush the whole memory cache.

-- 
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