[Catalyst] query once per session?

John Napiorkowski jjn1056 at yahoo.com
Thu Apr 26 23:09:47 GMT 2007

----- Original Message ----
From: Michael Higgins <mhiggins at banfieldgroup.com>
To: The elegant MVC web framework <catalyst at lists.rawmode.org>
Sent: Thursday, April 26, 2007 5:35:09 PM
Subject: [Catalyst] query once per session? 


I'm wondering how I can get a query (that becomes a drop-down list for a
form field) set to execute only once and return the data from the client
side, or at least from memory, until the session ends.

I've set something up to filter results based on selection from a form, but
getting the list each and every time is too lengthy a process for a table
only updated once a day.

I've tried using Plugin::Catalyst::Cache, but the docs leave me clueless.

Anyone have a suggestion?

Michael Higgins


If you are using the session plugins you can just assign some information to it in a similar way that you use the stash:

$c->session( some_stuff=>[qw/aaa bbb ccc/]);

If you are going to use this in lots of places you could write a model that accepted the current context to automatically do this for you.


List: Catalyst at lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Catalyst mailing list