summaryrefslogtreecommitdiffstats
path: root/lib/private/memcache/redis.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/memcache/redis.php')
-rw-r--r--lib/private/memcache/redis.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/memcache/redis.php b/lib/private/memcache/redis.php
index 83be662eabf..68b62e7534a 100644
--- a/lib/private/memcache/redis.php
+++ b/lib/private/memcache/redis.php
@@ -25,9 +25,9 @@
namespace OC\Memcache;
-use OCP\IMemcache;
+use OCP\IMemcacheTTL;
-class Redis extends Cache implements IMemcache {
+class Redis extends Cache implements IMemcacheTTL {
/**
* @var \Redis $cache
*/
@@ -195,6 +195,10 @@ class Redis extends Cache implements IMemcache {
return false;
}
+ public function setTTL($key, $ttl) {
+ self::$cache->expire($this->getNamespace() . $key, $ttl);
+ }
+
static public function isAvailable() {
return extension_loaded('redis')
&& version_compare(phpversion('redis'), '2.2.5', '>=');