| Catalyst-Plugin-Session-DynamicExpiry documentation | view source | Contained in the Catalyst-Plugin-Session-DynamicExpiry distribution. |
Catalyst::Plugin::Session::DynamicExpiry - per-session custom expiry times
# put Session::DynamicExpiry in your use Catalyst line
if ($c->req->param('remember') {
$c->session_time_to_live( 604800 ) # expire in one week.
}
This module allows you to expire session cookies indvidually per session.
If the session_time_to_live field is defined it will set expiry to that many
seconds into the future. Note that the session cookie is set on every request,
so a expiry of one week will stay as long as the user visits the site at least
once a week.
Once ttl has been set for a session the ttl will be stored in the
__time_to_live key within the session data itself, and reused for subsequent
request, so you only need to set this once per session (not once per request).
This is unlike the ttl option in the config in that it allows different sessions to have different times, to implement features like "remember me" checkboxes.
To set the TTL for this session use this method.
Overridden to implement dynamic expiry functionality.
Marcus Ramberg, mramberg@cpan.org
Yuval Kogman
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
| Catalyst-Plugin-Session-DynamicExpiry documentation | view source | Contained in the Catalyst-Plugin-Session-DynamicExpiry distribution. |