use Friendica\App\BaseURL;
use Friendica\Core\Cache;
use Friendica\Core\Cache\ICache;
-use Friendica\Core\Config\IConfiguration;
+use Friendica\Core\Config\IConfig;
use Friendica\Database\Database;
use Friendica\Util\Profiler;
use Psr\Log\LoggerInterface;
/**
* @var string The default cache if nothing set
*/
- const DEFAULT_TYPE = Cache\Cache::TYPE_DATABASE;
+ const DEFAULT_TYPE = Cache\Type::DATABASE;
/**
- * @var IConfiguration The IConfiguration to read parameters out of the config
+ * @var IConfig The IConfiguration to read parameters out of the config
*/
private $config;
*/
private $logger;
- public function __construct(BaseURL $baseURL, IConfiguration $config, Database $dba, Profiler $profiler, LoggerInterface $logger)
+ public function __construct(BaseURL $baseURL, IConfig $config, Database $dba, Profiler $profiler, LoggerInterface $logger)
{
$this->hostname = $baseURL->getHostname();
$this->config = $config;
}
switch ($type) {
- case Cache\Cache::TYPE_MEMCACHE:
+ case Cache\Type::MEMCACHE:
$cache = new Cache\MemcacheCache($this->hostname, $this->config);
break;
- case Cache\Cache::TYPE_MEMCACHED:
+ case Cache\Type::MEMCACHED:
$cache = new Cache\MemcachedCache($this->hostname, $this->config, $this->logger);
break;
- case Cache\Cache::TYPE_REDIS:
+ case Cache\Type::REDIS:
$cache = new Cache\RedisCache($this->hostname, $this->config);
break;
- case Cache\Cache::TYPE_APCU:
+ case Cache\Type::APCU:
$cache = new Cache\APCuCache($this->hostname);
break;
default: