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

David Cook <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #3 from David Cook <[email protected]> ---
(In reply to Nick Clemens from comment #2)
> We can definitely add more plugins here.
> 
> This feels a bit hacky, however, it reduces to a single lookup per page,
> avoids problems with cache coherence and is readable

Actually, it looks like there might be a cache coherence problem, since the
our-scoped variable will exist for the life of the process. You could wind up
with stale data if data is cached, the worker stays alive, data is changed in
the staff interface, and then requests are sent to that original worker.

I'd suggest just caching at the request-level. 

I would suggest creating a new() method which sets an object variable with the
required data. According to
http://www.template-toolkit.org/docs/modules/Template/Plugin.html, the new()
method will be called in the USE directive. 

This means that at template processing time you'll get 1 lookup, and then you
can reuse that data for the life of that request. 

There are even cache examples on that TT link above.

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