[Catalyst] DB values that change very rarely

Len Jaffe lenjaffe at jaffesystems.com
Thu Jan 10 16:18:07 GMT 2013

On Thu, Jan 10, 2013 at 10:15 AM, Jesse Sheidlower <jester at panix.com> wrote:

> Since I don't know when they might
> change, I don't know how I could cache them, because when a change is
> made it needs to take effect immediately.
> These tables are used on almost every request.

Use a cache that allows you to give names to cached objects.
Store your category list in the cache under a name like

When ever you change the categories, you expire the named object.  The you
either let the next lookup regenerate the list, or regenerate it when the
update is made to the list.

All access to the cached data must be performed through a machanism that
wraps the cache.


Did I hear you on "how to do everything", talking about Crash Blossoms?

-- =

lenjaffe at jaffesystems.com   614-404-4214   www.lenjaffe.com
Proprietor: http://www.theycomewithcheese.com/ - An Homage to Fromage
Perl Advent Planet <http://www.lenjaffe.com/PerlAdventPlanet/> - Advent
Calendars: Perlish and otherwise.
Greenbar <http://www.greenbartraining.org/>: Grubmaster: 2012-2009, Grub
Asst: 2008, Trained: 2007.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20130110/afbfd=

More information about the Catalyst mailing list