save cached config when saving database config, fixes #311

This commit is contained in:
Shish 2013-08-05 20:21:46 +01:00
parent 8bbf7e2171
commit 4fc1f2f217

View File

@ -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);
}
}