Added a lot of constants :-)

This commit is contained in:
Philipp 2023-07-26 23:02:09 +02:00
parent 9ff89a970a
commit acf52a9783
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
16 changed files with 51 additions and 65 deletions

View file

@ -1,35 +0,0 @@
<?php
/**
* @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
namespace Friendica\Core\Cache\Enum;
/**
* Enumeration for cache types
*/
abstract class Type
{
const APCU = 'apcu';
const REDIS = 'redis';
const ARRAY = 'array';
const MEMCACHE = 'memcache';
const DATABASE = 'database';
const MEMCACHED = 'memcached';
}

View file

@ -42,7 +42,7 @@ class Cache
/**
* @var string The default cache if nothing set
*/
const DEFAULT_TYPE = Enum\Type::DATABASE;
const DEFAULT_TYPE = Type\DatabaseCache::NAME;
/** @var ICanCreateInstances */
protected $instanceCreator;
/** @var IManageConfigValues */

View file

@ -33,7 +33,7 @@ use Memcache;
*/
class MemcacheCache extends AbstractCache implements ICanCacheInMemory
{
const NAME = 'memcached';
const NAME = 'memcache';
use CompareSetTrait;
use CompareDeleteTrait;