diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-03-25 08:06:54 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-03-25 08:06:54 +0400 |
commit | 5fcbc094bffe8f93a44c10bea514e47ccf5330c2 (patch) | |
tree | 5b3f92f130eb04bde40f6b215b5d5171b46181fa /core/Option.php | |
parent | 92256d5b2752b85430dfe70a30dabc2afa03022e (diff) |
refs #4903 started to work on the possibility to run multiple archivers in parallel for faster archiving. There were multiple issues, for instance there were arrays of siteIds read and written in Options but options do cache all values in a class property so an update of an option does not get updated on another running archiver. Also all sites were reprocessed because of the time_before_today_archive_considered_outdated setting if the last archiving by another archivier was 10 seconds or longer ago. To prevent this only maintaining a list of to be processed siteids in db / filesystem helps so far
Diffstat (limited to 'core/Option.php')
-rw-r--r-- | core/Option.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/Option.php b/core/Option.php index 63910cf7e5..4a98138da0 100644 --- a/core/Option.php +++ b/core/Option.php @@ -94,6 +94,11 @@ class Option return self::getInstance()->deleteNameLike($namePattern, $value); } + public static function clearCachedOption($name) + { + self::getInstance()->clearCachedOptionByName($name); + } + /** * Clears the option value cache and forces a reload from the Database. * Used in unit tests to reset the state of the object between tests. @@ -144,6 +149,13 @@ class Option { } + protected function clearCachedOptionByName($name) + { + if (isset($this->all[$name])) { + unset($this->all[$name]); + } + } + protected function getValue($name) { $this->autoload(); |