Skip Menu |

This queue is for tickets about the Apache-Session-Memcached CPAN distribution.

Report information
The Basics
Id: 56429
Status: new
Priority: 0/
Queue: Apache-Session-Memcached

People
Owner: Nobody in particular
Requestors: COUDOT [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: [Patch] Set expiration time for sessions
Hi, I submit a little patch that allow to specify "Expiration" parameter, so that sessions will be purged by memcached. This parameter is optional. The patch change version from 0.03 to 0.04, for better upgrade on systems. Is this module still alive? If yes, I would like to know if this patch can be applied. Thanks, Clément OUDOT.
Subject: memcached-expiration.patch
diff -r -u Apache-Session-Memcached-0.03/Changes Apache-Session-Memcached-0.04/Changes --- Apache-Session-Memcached-0.03/Changes 2004-09-20 10:58:18.000000000 +0200 +++ Apache-Session-Memcached-0.04/Changes 2010-04-09 15:50:51.000000000 +0200 @@ -2,7 +2,9 @@ Legenda: + = new feature, ! = updated feature/bug fix, - = removed feature - +0.04 Fri Apr 09 13:00:00 2010 + + Possibility to set Expiration + 0.03 Mon Sep 20 13:00:00 2004 ! Fixed 'remove' session method with 'delete' Cache::Memcached call + Added delete calls in tests diff -r -u Apache-Session-Memcached-0.03/lib/Apache/Session/Memcached.pm Apache-Session-Memcached-0.04/lib/Apache/Session/Memcached.pm --- Apache-Session-Memcached-0.03/lib/Apache/Session/Memcached.pm 2004-09-20 10:42:50.000000000 +0200 +++ Apache-Session-Memcached-0.04/lib/Apache/Session/Memcached.pm 2010-04-09 15:49:19.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use vars qw($VERSION); -$VERSION = '0.03'; +$VERSION = '0.04'; use base qw(Apache::Session); @@ -38,7 +38,8 @@ NoRehash => 1, Readonly => 0, Debug => 1, - CompressThreshold => 10_000 + CompressThreshold => 10_000, + Expiration => 3600, }; =head1 DESCRIPTION diff -r -u Apache-Session-Memcached-0.03/lib/Apache/Session/Store/Memcached.pm Apache-Session-Memcached-0.04/lib/Apache/Session/Store/Memcached.pm --- Apache-Session-Memcached-0.03/lib/Apache/Session/Store/Memcached.pm 2004-09-20 10:42:59.000000000 +0200 +++ Apache-Session-Memcached-0.04/lib/Apache/Session/Store/Memcached.pm 2010-04-09 15:49:19.000000000 +0200 @@ -3,7 +3,7 @@ use Cache::Memcached; use strict; use vars qw($VERSION); -$VERSION = '0.03'; +$VERSION = '0.04'; sub new { my($class,$session) = @_; @@ -31,12 +31,12 @@ if ( $self->{cache}->get($session->{data}->{_session_id}) ) { die "Object already exists in the data store."; } - $self->{cache}->set($session->{data}->{_session_id},$session->{serialized}); + $self->{cache}->set($session->{data}->{_session_id},$session->{serialized},$session->{args}->{Expiration}); } sub update { my($self,$session) = @_; - $self->{cache}->replace($session->{data}->{_session_id},$session->{serialized}); + $self->{cache}->replace($session->{data}->{_session_id},$session->{serialized},$session->{args}->{Expiration}); } sub materialize { Seulement dans Apache-Session-Memcached-0.03: Makefile.old diff -r -u Apache-Session-Memcached-0.03/MANIFEST Apache-Session-Memcached-0.04/MANIFEST --- Apache-Session-Memcached-0.03/MANIFEST 2004-09-16 18:09:48.000000000 +0200 +++ Apache-Session-Memcached-0.04/MANIFEST 2010-04-09 15:51:17.000000000 +0200 @@ -1,12 +1,12 @@ Changes +lib/Apache/Session/Memcached.pm +lib/Apache/Session/Store/Memcached.pm Makefile.PL MANIFEST +META.yml Module meta-data (added by MakeMaker) README -lib/Apache/Session/Memcached.pm -lib/Apache/Session/Store/Memcached.pm t/00base.t t/01cache.t t/02flex.t t/CONFIG t/testlib.pl -META.yml Module meta-data (added by MakeMaker) diff -r -u Apache-Session-Memcached-0.03/META.yml Apache-Session-Memcached-0.04/META.yml --- Apache-Session-Memcached-0.03/META.yml 2004-09-20 10:59:50.000000000 +0200 +++ Apache-Session-Memcached-0.04/META.yml 2010-04-09 15:49:19.000000000 +0200 @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: Apache-Session-Memcached -version: 0.03 +version: 0.04 version_from: lib/Apache/Session/Memcached.pm installdirs: site requires: diff -r -u Apache-Session-Memcached-0.03/t/CONFIG Apache-Session-Memcached-0.04/t/CONFIG --- Apache-Session-Memcached-0.03/t/CONFIG 2004-09-18 00:20:05.000000000 +0200 +++ Apache-Session-Memcached-0.04/t/CONFIG 2010-04-09 15:49:19.000000000 +0200 @@ -8,4 +8,4 @@ Serialize = Storable # memcached servers. It must be on the form: IP:port IP:port ... -Servers = 127.0.0.1:20000 +Servers = 127.0.0.1:11211