diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-06-25 17:59:06 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-06-25 21:05:10 +0200 |
commit | c6b9f613bb109d4ecfe66e51e7fbf0322f96c2b1 (patch) | |
tree | 1575fa6c33fa748dbf9b6f55a6af32b216fcde76 /lib/cache | |
parent | fe0f281b4fdd4932bde16e84e98c0ea572d3c96e (diff) | |
download | nextcloud-server-c6b9f613bb109d4ecfe66e51e7fbf0322f96c2b1.tar.gz nextcloud-server-c6b9f613bb109d4ecfe66e51e7fbf0322f96c2b1.zip |
Cache: try to set the fast cache in the Broker
Diffstat (limited to 'lib/cache')
-rw-r--r-- | lib/cache/broker.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/cache/broker.php b/lib/cache/broker.php index 62a7cd96d15..931d0dd407e 100644 --- a/lib/cache/broker.php +++ b/lib/cache/broker.php @@ -23,15 +23,13 @@ class OC_Cache_Broker { } public function set($key, $value, $ttl=0) { - $set_slow = strlen($value) > 8192; - if ($set_slow) { + if (!$this->fast_cache->set($key, $value, $ttl)) { if ($this->fast_cache->hasKey($key)) { $this->fast_cache->remove($key); } - $this->slow_cache->set($key, $value, $ttl); - } else { - $this->fast_cache->set($key, $value, $ttl); + return $this->slow_cache->set($key, $value, $ttl); } + return true; } public function hasKey($key) { |