[Catalyst] noob question about session timeouts

Kiki kiki at bsdro.org
Mon Nov 17 17:37:15 GMT 2008

Matt S Trout wrote:
> On Sun, Nov 02, 2008 at 10:20:08PM +0000, Peter Flanigan wrote:
>> Cliff Green wrote:
>>> When a session expires in the app I'm putting together, the user is sent 
>>> back to the login screen at the next request, as expected.  What I'd 
>>> like to do is stuff something like 'Session Expired' into 
>>> $c->stash->{error_msg} and have it displayed, letting the user know what 
>>> just happened.
>> Read up on Catalyst::Plugin::Session::flash
> No, don't. We stole that from rails because it seemed like a good idea at
> the time.
> It isn't. It's evil, horrible, inefficient, and if you think you wanted it,
> you didn't (multi tab issues, refresh issues, race conditions, dead kittens
> etc.).
> If you really want transient data of that ilk, stuff it in $c->cache under
> a key starting with the session id.
> ... if I write up an outline of how you'd generalise that, anybody fancy
> having a go at hacking it together?
I'd like to give it a try if it's OK. This is supposed to go into the 
session plugin right? Or should it be an extra plugin?

More information about the Catalyst mailing list