Rename *CacheDriver to *Cache because they don't act as driver anymore

This commit is contained in:
Philipp Holzer 2019-08-04 10:26:53 +02:00
parent d56bd28a07
commit 86bf2ee45a
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
38 changed files with 152 additions and 144 deletions

View file

@ -4,7 +4,7 @@ namespace Friendica\Console;
use Asika\SimpleConsole\CommandArgsException;
use Friendica\App;
use Friendica\Core\Cache\ICacheDriver;
use Friendica\Core\Cache\ICache;
use Friendica\Core\Config\Configuration;
use Friendica\Factory\CacheDriverFactory;
use RuntimeException;
@ -33,7 +33,7 @@ class Cache extends \Asika\SimpleConsole\Console
private $cacheDriverName;
/**
* @var ICacheDriver
* @var ICache
*/
private $cache;
@ -71,7 +71,7 @@ HELP;
return $help;
}
public function __construct(App\Mode $appMode, Configuration $config, ICacheDriver $cache, array $argv = null)
public function __construct(App\Mode $appMode, Configuration $config, ICache $cache, array $argv = null)
{
parent::__construct($argv);
@ -161,7 +161,7 @@ HELP;
if (count($this->args) >= 3) {
$key = $this->getArgument(1);
$value = $this->getArgument(2);
$duration = intval($this->getArgument(3, ICacheDriver::FIVE_MINUTES));
$duration = intval($this->getArgument(3, ICache::FIVE_MINUTES));
if (is_array($this->cache->get($key))) {
throw new RuntimeException("$key is an array and can't be set using this command.");