Subject: | Minor addition of the (already supported by Cached::Memcached) ``namespace'' attribute |
Since we're talking sessions for web applications here, the namespace
attribute of Cached::Memcached is very useful to tell apart web apps
writing to the same memcached servers.
Rather trivial, I know, but saves time.
Subject: | apache-session-store-memcached.patch |
--- Memcached.pm.old 2004-09-20 11:42:59.000000000 +0300
+++ Memcached.pm 2009-04-15 17:19:05.521882951 +0300
@@ -15,6 +15,7 @@
no_rehash => $session->{args}->{NoRehash},
readonly => $session->{args}->{ReadOnly},
debug => $session->{args}->{Debug},
+ namespace => $session->{args}->{Namespace},
compress_threshold => $session->{args}->{CompressThreshold} || 10_000,
);
@@ -64,6 +65,7 @@
NoRehash => 1,
Readonly => 0,
Debug => 1,
+ Namespace => 'myapp',
CompressThreshold => 10_000
};
@@ -97,9 +99,9 @@
Note that spelling of options are slightly different from those for
Cache::Memcached.
-'Servers', 'NoRehash', 'Readonly', 'Debug' and 'CompressThreshold' are the
-corrispondant to 'servers', 'no_rehash', 'readonly', 'debug' and
-'compress_threshold' Cache::Memcached parameters.
+'Servers', 'NoRehash', 'Readonly', 'Debug', 'Namespace' and 'CompressThreshold'
+are the correspondant to 'servers', 'no_rehash', 'readonly', 'debug',
+'namespace' and 'compress_threshold' Cache::Memcached parameters.
In addition 'Server' can be either a scalar of the form 'IP:port IP:port ...',
either an arrayref of hosts (as required by Cache::Memcached).