]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Config/Configuration.php
Splitting ConfigCache & PConfigCache
[friendica.git] / src / Core / Config / Configuration.php
index c6fe626d91e441f1033142e64bda5e2ce6b526ac..1489d91de04823104178c0f954f6d04e5249e212 100644 (file)
@@ -11,17 +11,7 @@ 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
+        * @var Cache\ConfigCache
         */
        private $configCache;
 
@@ -31,10 +21,10 @@ class Configuration
        private $configAdapter;
 
        /**
-        * @param Cache\IConfigCache     $configCache   The configuration cache (based on the config-files)
+        * @param Cache\ConfigCache     $configCache   The configuration cache (based on the config-files)
         * @param Adapter\IConfigAdapter $configAdapter The configuration DB-backend
         */
-       public function __construct(Cache\IConfigCache $configCache, Adapter\IConfigAdapter $configAdapter)
+       public function __construct(Cache\ConfigCache $configCache, Adapter\IConfigAdapter $configAdapter)
        {
                $this->configCache = $configCache;
                $this->configAdapter = $configAdapter;
@@ -45,7 +35,7 @@ class Configuration
        /**
         * Returns the Config Cache
         *
-        * @return Cache\IConfigCache
+        * @return Cache\ConfigCache
         */
        public function getCache()
        {
@@ -98,7 +88,7 @@ class Configuration
 
                        if (isset($dbvalue)) {
                                $this->configCache->set($cat, $key, $dbvalue);
-                               return $dbvalue;
+                               unset($dbvalue);
                        }
                }
 
@@ -127,7 +117,7 @@ class Configuration
                $cached = $this->configCache->set($cat, $key, $value);
 
                // If there is no connected adapter, we're finished
-               if (!$this->configAdapter->isConnected() || !empty($this->configSaveBlacklist[$cat][$key])) {
+               if (!$this->configAdapter->isConnected()) {
                        return $cached;
                }