diff options
author | Brion Vibber <brion@pobox.com> | 2010-01-28 16:55:37 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-01-28 16:55:37 -0800 |
commit | da34de74fece355785710bc4ff0bab03389a2877 (patch) | |
tree | c6830f8edcae1cc508fd7cf32a1f6e6ff59ba580 /plugins/MemcachePlugin.php | |
parent | 63a0e84a8b94d84b106431b648ec76e2537ab9c6 (diff) | |
parent | d13d73c5630244963f0c3bd9db68dd6c6451821a (diff) |
Merge branch 'testing'
Diffstat (limited to 'plugins/MemcachePlugin.php')
-rw-r--r-- | plugins/MemcachePlugin.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/MemcachePlugin.php b/plugins/MemcachePlugin.php index 8c8b8da6d..2bc4b892b 100644 --- a/plugins/MemcachePlugin.php +++ b/plugins/MemcachePlugin.php @@ -59,6 +59,8 @@ class MemcachePlugin extends Plugin public $persistent = null; + public $defaultExpiry = 86400; // 24h + /** * Initialize the plugin * @@ -110,6 +112,9 @@ class MemcachePlugin extends Plugin function onStartCacheSet(&$key, &$value, &$flag, &$expiry, &$success) { $this->_ensureConn(); + if ($expiry === null) { + $expiry = $this->defaultExpiry; + } $success = $this->_conn->set($key, $value, $flag, $expiry); Event::handle('EndCacheSet', array($key, $value, $flag, $expiry)); |