----- Original Message ---- From: Michael Higgins <[EMAIL PROTECTED]> To: The elegant MVC web framework <[email protected]> Sent: Thursday, April 26, 2007 5:35:09 PM Subject: [Catalyst] query once per session?
Hello, 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 Hi, 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. --John _______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/ __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
