[Jifty-commit] jifty branch, cas-memcached, updated. 57a4fcc33ad624d6004913cf80e0ee69775e5755
Jifty commits
jifty-commit at lists.jifty.org
Tue Jan 26 21:16:58 EST 2010
The branch, cas-memcached has been updated
via 57a4fcc33ad624d6004913cf80e0ee69775e5755 (commit)
from 75d11b59bfb3cbb381ec76d6b6de606aac9a3933 (commit)
Summary of changes:
lib/Jifty/CAS/Store/Memcached.pm | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit 57a4fcc33ad624d6004913cf80e0ee69775e5755
Author: Thomas Sibley <trs at bestpractical.com>
Date: Tue Jan 26 21:16:53 2010 -0500
Set an expiration on memcached CAS content
diff --git a/lib/Jifty/CAS/Store/Memcached.pm b/lib/Jifty/CAS/Store/Memcached.pm
index cb5ba8b..d7d5e84 100644
--- a/lib/Jifty/CAS/Store/Memcached.pm
+++ b/lib/Jifty/CAS/Store/Memcached.pm
@@ -51,13 +51,10 @@ Stores the BLOB (a L<Jifty::CAS::Blob>) in memcached. Returns the key.
sub _store {
my ($class, $domain, $name, $blob) = @_;
- # my $db = $CONTAINER{$domain} ||= {};
- # $db->{DB}{$key} = $blob;
- # $db->{KEYS}{$name} = $key;
-
+ # Default to expiring in two weeks. XXX TODO this should be configurable
my $key = $blob->key;
- $class->memcached->set("$domain:db:$key", $blob);
- $class->memcached->set("$domain:keys:$name", $key);
+ $class->memcached->set("$domain:db:$key", $blob, 60*60*24*14);
+ $class->memcached->set("$domain:keys:$name", $key, 60*60*24*14);
return $key;
}
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list