Merge pull request #17950 from owncloud/config-dontdetectfschangesinrootbydefault

Disable filesystem_check_changes by default
remotes/origin/handlebars-approach
Robin McCorkell 2015-07-29 15:34:02 +07:00
commit 3ef680d966
3 changed files with 5 additions and 2 deletions

@ -975,7 +975,7 @@ $CONFIG = array(
* 2 -> Check every time the filesystem is used, causes a performance hit when * 2 -> Check every time the filesystem is used, causes a performance hit when
* using external storages, not recommended for regular use. * using external storages, not recommended for regular use.
*/ */
'filesystem_check_changes' => 1, 'filesystem_check_changes' => 0,
/** /**
* All css and js files will be served by the web server statically in one js * All css and js files will be served by the web server statically in one js

@ -338,7 +338,7 @@ abstract class Common implements Storage {
} }
if (!isset($this->watcher)) { if (!isset($this->watcher)) {
$this->watcher = new Watcher($storage); $this->watcher = new Watcher($storage);
$globalPolicy = \OC::$server->getConfig()->getSystemValue('filesystem_check_changes', Watcher::CHECK_ONCE); $globalPolicy = \OC::$server->getConfig()->getSystemValue('filesystem_check_changes', Watcher::CHECK_NEVER);
$this->watcher->setPolicy((int)$this->getMountOption('filesystem_check_changes', $globalPolicy)); $this->watcher->setPolicy((int)$this->getMountOption('filesystem_check_changes', $globalPolicy));
} }
return $this->watcher; return $this->watcher;

@ -39,6 +39,7 @@ class Watcher extends \Test\TestCase {
$storage = $this->getTestStorage(); $storage = $this->getTestStorage();
$cache = $storage->getCache(); $cache = $storage->getCache();
$updater = $storage->getWatcher(); $updater = $storage->getWatcher();
$updater->setPolicy(\OC\Files\Cache\Watcher::CHECK_ONCE);
//set the mtime to the past so it can detect an mtime change //set the mtime to the past so it can detect an mtime change
$cache->put('', array('storage_mtime' => 10)); $cache->put('', array('storage_mtime' => 10));
@ -79,6 +80,7 @@ class Watcher extends \Test\TestCase {
$storage = $this->getTestStorage(); $storage = $this->getTestStorage();
$cache = $storage->getCache(); $cache = $storage->getCache();
$updater = $storage->getWatcher(); $updater = $storage->getWatcher();
$updater->setPolicy(\OC\Files\Cache\Watcher::CHECK_ONCE);
//set the mtime to the past so it can detect an mtime change //set the mtime to the past so it can detect an mtime change
$cache->put('', array('storage_mtime' => 10)); $cache->put('', array('storage_mtime' => 10));
@ -95,6 +97,7 @@ class Watcher extends \Test\TestCase {
$storage = $this->getTestStorage(); $storage = $this->getTestStorage();
$cache = $storage->getCache(); $cache = $storage->getCache();
$updater = $storage->getWatcher(); $updater = $storage->getWatcher();
$updater->setPolicy(\OC\Files\Cache\Watcher::CHECK_ONCE);
//set the mtime to the past so it can detect an mtime change //set the mtime to the past so it can detect an mtime change
$cache->put('foo.txt', array('storage_mtime' => 10)); $cache->put('foo.txt', array('storage_mtime' => 10));