Restructure Cache to follow new paradigm

This commit is contained in:
Philipp 2021-10-23 10:49:27 +02:00
parent 6a85d09c59
commit 68046573a4
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
52 changed files with 103 additions and 71 deletions

View file

@ -21,7 +21,7 @@
namespace Friendica\Test\src\Core\Cache;
use Friendica\Core\Cache\APCuCache;
use Friendica\Core\Cache\Type\APCuCache;
/**
* @group APCU

View file

@ -21,7 +21,7 @@
namespace Friendica\Test\src\Core\Cache;
use Friendica\Core\Cache\ArrayCache;
use Friendica\Core\Cache\Type\ArrayCache;
class ArrayCacheTest extends MemoryCacheTest
{

View file

@ -60,7 +60,7 @@ class DatabaseCacheTest extends CacheTest
$dba = new StaticDatabase($configCache, $profiler, $logger);
$this->cache = new Cache\DatabaseCache('database', $dba);
$this->cache = new Cache\Type\DatabaseCache('database', $dba);
return $this->cache;
}

View file

@ -22,7 +22,7 @@
namespace Friendica\Test\src\Core\Cache;
use Exception;
use Friendica\Core\Cache\MemcacheCache;
use Friendica\Core\Cache\Type\MemcacheCache;
use Friendica\Core\Config\IConfig;
use Mockery;

View file

@ -22,7 +22,7 @@
namespace Friendica\Test\src\Core\Cache;
use Exception;
use Friendica\Core\Cache\MemcachedCache;
use Friendica\Core\Cache\Type\MemcachedCache;
use Friendica\Core\Config\IConfig;
use Mockery;
use Psr\Log\NullLogger;

View file

@ -22,7 +22,7 @@
namespace Friendica\Test\src\Core\Cache;
use Exception;
use Friendica\Core\Cache\RedisCache;
use Friendica\Core\Cache\Type\RedisCache;
use Friendica\Core\Config\IConfig;
use Mockery;
@ -58,7 +58,7 @@ class RedisCacheTest extends MemoryCacheTest
->andReturn(null);
try {
$this->cache = new RedisCache($host, $configMock);
$this->cache = new \Friendica\Core\Cache\Type\RedisCache($host, $configMock);
} catch (Exception $e) {
static::markTestSkipped('Redis is not available. Failure: ' . $e->getMessage());
}

View file

@ -21,7 +21,7 @@
namespace Friendica\Test\src\Core\Lock;
use Friendica\Core\Cache\APCuCache;
use Friendica\Core\Cache\Type\APCuCache;
use Friendica\Core\Lock\CacheLock;
/**

View file

@ -21,7 +21,7 @@
namespace Friendica\Test\src\Core\Lock;
use Friendica\Core\Cache\ArrayCache;
use Friendica\Core\Cache\Type\ArrayCache;
use Friendica\Core\Lock\CacheLock;
class ArrayCacheLockTest extends LockTest

View file

@ -22,7 +22,7 @@
namespace Friendica\Test\src\Core\Lock;
use Exception;
use Friendica\Core\Cache\MemcacheCache;
use Friendica\Core\Cache\Type\MemcacheCache;
use Friendica\Core\Config\IConfig;
use Friendica\Core\Lock\CacheLock;
use Mockery;

View file

@ -22,7 +22,7 @@
namespace Friendica\Test\src\Core\Lock;
use Exception;
use Friendica\Core\Cache\MemcachedCache;
use Friendica\Core\Cache\Type\MemcachedCache;
use Friendica\Core\Config\IConfig;
use Friendica\Core\Lock\CacheLock;
use Mockery;

View file

@ -22,7 +22,7 @@
namespace Friendica\Test\src\Core\Lock;
use Exception;
use Friendica\Core\Cache\RedisCache;
use Friendica\Core\Cache\Type\RedisCache;
use Friendica\Core\Config\IConfig;
use Friendica\Core\Lock\CacheLock;
use Mockery;