Refactor Cache/Lock to DICE

- Refactor Cache classes
- Refactor Lock classes
- Improved test speed (removed some seperate class annotations)
This commit is contained in:
Philipp Holzer
2019-08-03 20:48:56 +02:00
parent b95d4f41b9
commit d56bd28a07
40 changed files with 766 additions and 621 deletions

View File

@@ -2,7 +2,9 @@
use Dice\Dice;
use Friendica\App;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\Lock\ILockDriver;
use Friendica\Database\Database;
use Friendica\Factory;
use Friendica\Util;
@@ -116,4 +118,19 @@ return [
['createDev', [], Dice::CHAIN_CALL],
]
],
Cache\ICacheDriver::class => [
'instanceOf' => Factory\CacheDriverFactory::class,
'call' => [
['create', [], Dice::CHAIN_CALL],
],
],
Cache\IMemoryCacheDriver::class => [
'instanceOf' => Cache\ICacheDriver::class,
],
ILockDriver::class => [
'instanceOf' => Factory\LockDriverFactory::class,
'call' => [
['create', [], Dice::CHAIN_CALL],
],
],
];