summaryrefslogtreecommitdiffstats
path: root/lib/private/AllConfig.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/AllConfig.php')
-rw-r--r--lib/private/AllConfig.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php
index af26d30d8e9..cd1d5f69ac1 100644
--- a/lib/private/AllConfig.php
+++ b/lib/private/AllConfig.php
@@ -215,11 +215,14 @@ class AllConfig implements \OCP\IConfig {
// TODO - FIXME
$this->fixDIInit();
+ // warm up the cache to avoid updating the value if it is already set to this value before
+ $this->getUserValue($userId, $appName, $key);
+
if (isset($this->userCache[$userId][$appName][$key])) {
if ($this->userCache[$userId][$appName][$key] === (string)$value) {
return;
} else if ($preCondition !== null && $this->userCache[$userId][$appName][$key] !== (string)$preCondition) {
- return;
+ throw new PreConditionNotMetException();
} else {
$qb = $this->connection->getQueryBuilder();
$qb->update('preferences')