]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Console/Cache.php
Merge branch '2018.12-rc' into task/move-config-to-php-array
[friendica.git] / src / Core / Console / Cache.php
index d0bc427dee7712b9a2c0e4886421e46593f1d384..510c05b04acec6cbb068cfdafb3f9714f70e9f7b 100644 (file)
@@ -65,7 +65,7 @@ HELP;
                        $this->out('Options: ' . var_export($this->options, true));
                }
 
-               if (!($a->mode & App::MODE_DBCONFIGAVAILABLE)) {
+               if ($a->getMode()->has(App\Mode::DBCONFIGAVAILABLE)) {
                        $this->out('Database isn\'t ready or populated yet, database cache won\'t be available');
                }
 
@@ -105,7 +105,7 @@ HELP;
        private function executeList()
        {
                $prefix = $this->getArgument(1);
-               $keys = Core\Cache::getAllKeys();
+               $keys = Core\Cache::getAllKeys($prefix);
 
                if (empty($prefix)) {
                        $this->out('Listing all cache keys:');
@@ -115,10 +115,8 @@ HELP;
 
                $count = 0;
                foreach ($keys as $key) {
-                       if (empty($prefix) || strpos($key, $prefix) === 0) {
-                               $this->out($key);
-                               $count++;
-                       }
+                       $this->out($key);
+                       $count++;
                }
 
                $this->out($count . ' keys found');