[Catalyst-commits] r13648 -
Catalyst-Plugin-Session/0.00/trunk/lib/Catalyst/Plugin
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Fri Oct 8 14:19:05 GMT 2010
Author: t0m
Date: 2010-10-08 15:19:05 +0100 (Fri, 08 Oct 2010)
New Revision: 13648
Modified:
Catalyst-Plugin-Session/0.00/trunk/lib/Catalyst/Plugin/Session.pm
Log:
Optimisation - only save session if data added by application
Modified: Catalyst-Plugin-Session/0.00/trunk/lib/Catalyst/Plugin/Session.pm
===================================================================
--- Catalyst-Plugin-Session/0.00/trunk/lib/Catalyst/Plugin/Session.pm 2010-10-05 20:02:14 UTC (rev 13647)
+++ Catalyst-Plugin-Session/0.00/trunk/lib/Catalyst/Plugin/Session.pm 2010-10-08 14:19:05 UTC (rev 13648)
@@ -13,7 +13,7 @@
use namespace::clean -except => 'meta';
-our $VERSION = '0.30';
+our $VERSION = '0.31';
$VERSION = eval $VERSION;
my @session_data_accessors; # used in delete_session
@@ -499,8 +499,7 @@
my $now = time;
- return $c->_session(
- {
+ my $session_data = {
__created => $now,
__updated => $now,
@@ -514,8 +513,12 @@
? ( __user_agent => $c->request->user_agent||'' )
: ()
),
- }
- );
+ };
+
+ # Only save this session if data is added by the application
+ $c->_session_data_sig( Object::Signature::signature($session_data) );
+
+ return $c->_session($session_data);
}
sub generate_session_id {
More information about the Catalyst-commits
mailing list