Added first version of ConfigCacheSaver

This commit is contained in:
Philipp Holzer
2019-03-23 15:37:05 +01:00
parent dda26a46f5
commit 383a6715c3
14 changed files with 409 additions and 68 deletions

View File

@@ -10,6 +10,16 @@ namespace Friendica\Core\Config;
*/
class Configuration
{
/**
* The blacklist of configuration settings, which should not get saved to the backend
* @var array
*/
private $configSaveBlacklist = [
'config' => [
'hostname' => true,
]
];
/**
* @var Cache\IConfigCache
*/
@@ -117,7 +127,7 @@ class Configuration
$cached = $this->configCache->set($cat, $key, $value);
// If there is no connected adapter, we're finished
if (!$this->configAdapter->isConnected()) {
if (!$this->configAdapter->isConnected() && !empty($this->configSaveBlacklist[$cat][$key])) {
return $cached;
}