diff options
author | ringmaster <epithet@gmail.com> | 2014-05-27 16:01:16 -0400 |
---|---|---|
committer | ringmaster <epithet@gmail.com> | 2014-05-27 16:01:16 -0400 |
commit | 26d169b27c43d06db1158990e33939b85d14a60d (patch) | |
tree | aeb623b8bbd8f73043d2e691d4235c428bce9b71 | |
parent | 3b287f8274ef263d3144410bb6e3bf1a966f9d6d (diff) | |
download | nextcloud-server-26d169b27c43d06db1158990e33939b85d14a60d.tar.gz nextcloud-server-26d169b27c43d06db1158990e33939b85d14a60d.zip |
Use 'filesystem_check_enable' as a config option.
-rwxr-xr-x | config/config.sample.php | 5 | ||||
-rw-r--r-- | lib/private/files/cache/scanner.php | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/config/config.sample.php b/config/config.sample.php index 80694837edc..8fb782e7cf4 100755 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -291,6 +291,9 @@ $CONFIG = array( * 1 -> check each file or folder at most once per request, recomended for general use if outside changes might happen * 2 -> check every time the filesystem is used, causes a performance hit when using external storages, not recomended for regular use */ -'filesystem_check_changes' => 1 +'filesystem_check_changes' => 1, + +/* specifies whether changes in the filesystem outside of owncloud affect cached data about those files */ +'filesystem_check_enable' => 1, ); diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index 24d406f7cd5..e838a8b6258 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -157,7 +157,7 @@ class Scanner extends BasicEmitter { } } if (!empty($newData)) { - $addToCache = Config::getSystemValue('allow_scanner_to_affect_cache', true); + $addToCache = Config::getSystemValue('filesystem_check_enable', true); \OC_Hook::emit('Scanner', 'addToCache', array('file' => $file, 'addToCache' => &$addToCache, 'data' => &$newData)); if($addToCache) { $data['fileid'] = $this->cache->put($file, $newData); @@ -166,7 +166,7 @@ class Scanner extends BasicEmitter { \OC_Hook::emit('\OC\Files\Cache\Scanner', 'post_scan_file', array('path' => $file, 'storage' => $this->storageId)); } } else { - $removeFromCache = Config::getSystemValue('allow_scanner_to_affect_cache', true); + $removeFromCache = Config::getSystemValue('filesystem_check_enable', true); \OC_Hook::emit('Scanner', 'removeFromCache', array('file' => $file, 'removeFromCache' => &$removeFromCache)); if($removeFromCache) { $this->cache->remove($file); @@ -253,7 +253,7 @@ class Scanner extends BasicEmitter { $removedChildren = \array_diff($existingChildren, $newChildren); foreach ($removedChildren as $childName) { $child = ($path) ? $path . '/' . $childName : $childName; - $removeFromCache = Config::getSystemValue('allow_scanner_to_affect_cache', true); + $removeFromCache = Config::getSystemValue('filesystem_check_enable', true); \OC_Hook::emit('Scanner', 'removeFromCache', array('file' => $child, 'removeFromCache' => &$removeFromCache)); if($removeFromCache) { $this->cache->remove($child); @@ -277,7 +277,7 @@ class Scanner extends BasicEmitter { } } $newData = array('size' => $size); - $addToCache = Config::getSystemValue('allow_scanner_to_affect_cache', true); + $addToCache = Config::getSystemValue('filesystem_check_enable', true); \OC_Hook::emit('Scanner', 'addToCache', array('file' => $child, 'addToCache' => &$addToCache, 'data' => &$newData)); if($addToCache) { $this->cache->put($path, $newData); |