From 4fc1f2f2172d423f1ed2e441bec6ca544c32b2ee Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 5 Aug 2013 20:21:46 +0100 Subject: [PATCH] save cached config when saving database config, fixes #311 --- core/config.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/config.class.php b/core/config.class.php index 285fb352..66d5d58a 100644 --- a/core/config.class.php +++ b/core/config.class.php @@ -211,7 +211,9 @@ class DatabaseConfig extends BaseConfig { $this->database->Execute("DELETE FROM config WHERE name = :name", array("name"=>$name)); $this->database->Execute("INSERT INTO config VALUES (:name, :value)", array("name"=>$name, "value"=>$this->values[$name])); } - $this->database->cache->delete("config"); + // rather than deleting and having some other request(s) do a thundering + // herd of race-conditioned updates, just save the updated version once here + $this->database->cache->set("config", $this->values); } }