Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-03-25 08:06:54 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-03-25 08:06:54 +0400
commit5fcbc094bffe8f93a44c10bea514e47ccf5330c2 (patch)
tree5b3f92f130eb04bde40f6b215b5d5171b46181fa /core/Option.php
parent92256d5b2752b85430dfe70a30dabc2afa03022e (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.php12
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();