summaryrefslogtreecommitdiffstats
path: root/lib/cache
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-08-08 09:44:19 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2013-08-08 09:44:19 +0200
commitab6e47b44adf7bbcfac232af22ec66283cbbd017 (patch)
tree92b7d9aae064e7731f8a1d495c05dd9401ce9af7 /lib/cache
parentb39d2d19382a7642099be94f6460cd473dcfaaf9 (diff)
downloadnextcloud-server-ab6e47b44adf7bbcfac232af22ec66283cbbd017.tar.gz
nextcloud-server-ab6e47b44adf7bbcfac232af22ec66283cbbd017.zip
oc_cache needs to disable file proxys for read/write operation. Otherwise the operation will go through the encryption app which will not work.
Diffstat (limited to 'lib/cache')
-rw-r--r--lib/cache/file.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/cache/file.php b/lib/cache/file.php
index 531e1d50f40..ba3dedaf8f3 100644
--- a/lib/cache/file.php
+++ b/lib/cache/file.php
@@ -29,22 +29,30 @@ class OC_Cache_File{
}
public function get($key) {
+ $result = null;
+ $proxyStatus = \OC_FileProxy::$enabled;
+ \OC_FileProxy::$enabled = false;
if ($this->hasKey($key)) {
$storage = $this->getStorage();
- return $storage->file_get_contents($key);
+ $result = $storage->file_get_contents($key);
}
- return null;
+ \OC_FileProxy::$enabled = $proxyStatus;
+ return $result;
}
public function set($key, $value, $ttl=0) {
$storage = $this->getStorage();
+ $result = false;
+ $proxyStatus = \OC_FileProxy::$enabled;
+ \OC_FileProxy::$enabled = false;
if ($storage and $storage->file_put_contents($key, $value)) {
if ($ttl === 0) {
$ttl = 86400; // 60*60*24
}
- return $storage->touch($key, time() + $ttl);
+ $result = $storage->touch($key, time() + $ttl);
}
- return false;
+ \OC_FileProxy::$enabled = $proxyStatus;
+ return $result;
}
public function hasKey($key) {