Move Cache to strategies

This commit is contained in:
Philipp 2023-07-22 23:57:38 +02:00
parent f1da323b07
commit f2c02a79b9
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
12 changed files with 98 additions and 119 deletions

View file

@ -178,6 +178,20 @@ return [
$_SERVER,
],
],
'$hostname' => [
'instanceOf' => App\BaseURL::class,
'constructParams' => [
$_SERVER,
],
'call' => [
['getHost', [], Dice::CHAIN_CALL],
],
],
Cache\Type\AbstractCache::class => [
'constructParams' => [
[Dice::INSTANCE => '$hostname'],
],
],
App\Page::class => [
'constructParams' => [
[Dice::INSTANCE => '$basepath'],

View file

@ -19,7 +19,7 @@
*
*/
use Friendica\Core\Hooks\Capabilities\BehavioralHookType as H;
use Friendica\Core\Cache;
use Friendica\Core\Logger\Type;
use Psr\Log;
@ -29,4 +29,11 @@ return [
Type\SyslogLogger::class => ['syslog'],
Type\StreamLogger::class => ['stream'],
],
Cache\Capability\ICanCache::class => [
Cache\Type\APCuCache::class => ['apcu'],
Cache\Type\DatabaseCache::class => ['database', ''],
Cache\Type\MemcacheCache::class => ['memcache'],
Cache\Type\MemcachedCache::class => ['memcached'],
Cache\Type\RedisCache::class => ['redis'],
]
];