4
0
mirror of https://github.com/AzuraCast/AzuraCast.git synced 2024-06-13 12:46:41 +00:00

Revert service configuration change.

This commit is contained in:
Buster "Silver Eagle" Neece 2020-10-05 02:07:36 -05:00
parent c6aa34f65f
commit 1a1ef5f013
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E

View File

@ -136,7 +136,14 @@ return [
Doctrine\ORM\EntityManagerInterface::class => DI\Get(App\Doctrine\DecoratedEntityManager::class),
// Cache
Psr\Cache\CacheItemPoolInterface::class => DI\autowire(Cache\Adapter\Redis\RedisCachePool::class),
Psr\Cache\CacheItemPoolInterface::class => function (App\Settings $settings, Psr\Container\ContainerInterface $di) {
// Never use the Redis cache for CLI commands, as the CLI commands are where
// the Redis cache gets flushed, so this will lead to a race condition that can't
// be solved within the application.
return $settings->enableRedis() && !$settings->isCli()
? new Cache\Adapter\Redis\RedisCachePool($di->get(Redis::class))
: new Cache\Adapter\PHPArray\ArrayCachePool;
},
Psr\SimpleCache\CacheInterface::class => DI\get(Psr\Cache\CacheItemPoolInterface::class),
// Doctrine cache