[Catalyst-dev] C::P::Session::DynamicExpiry implementation
Hideo Kimura
hide at hide-k.net
Thu Aug 10 19:05:38 CEST 2006
Hi, Yuval,
Sorry to bother you agin.
I checked 0.02 in repos.
I think it is better to override calculate_session_cookie_expires
method too, if {session}{cookie_expires} value is set in config.
sub calculate_session_cookie_expires {
my $c = shift;
if ( defined(my $ttl = $c->session_time_to_live) ) {
$c->log->debug("Overridden cookie time to live: $ttl") if $c->debug;
return time() + $ttl;
}
return $c->NEXT::calculate_session_cookie_expires( @_ );
}
What do you think?
--
hide
On Fri, 11 Aug 2006 01:08:09 +0900
Hideo Kimura <hide at hide-k.net> wrote:
> Hi, Yuval
>
> On Thu, 10 Aug 2006 18:43:58 +0300
> Yuval Kogman <nothingmuch at woobling.org> wrote:
>
> > On Thu, Aug 10, 2006 at 23:54:04 +0900, Hideo Kimura wrote:
> >
> > > I just wrote it, because I needed to use it for my current task.
> > > I am looking forward to your release.
> >
> > Done (0.02), with a refactored C::P::Session 0.11.
> >
> > The interface is slighlty updated to be less ugly:
> >
> > $c->session_time_to_live( $ttl );
> >
> > And the code on the whole actually works for this release (it's not
> > just for cookies, but for the entire session, like your updated
> > version).
>
> Thank you for your quick reply!
> I'll check it later.
>
> Anyway, I can throw out my ugly code. =)
>
> --
> hide
>
>
>
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst-dev
More information about the Catalyst-dev
mailing list