Hello
I try setup PSR-16 Redis cache adapter like this
$storage = $this->storageFactory->create('redis');
$cache = new SimpleCacheDecorator($storage);
Based on PSR-16 - laminas-cache - Laminas Docs
By I get this error, No resource with id 'default'
, any default setting and load config needed? what is your idea?
Additional information:
Laminas\Cache\Exception\RuntimeException
File:
/var/www/html/local/laminas/vendor/laminas/laminas-cache-storage-adapter-redis/src/RedisResourceManager.php:530
Message:
No resource with id 'default'
Stack trace:
#0 /var/www/html/local/laminas/vendor/laminas/laminas-cache-storage-adapter-redis/src/Redis.php(491): Laminas\Cache\Storage\Adapter\RedisResourceManager->getLibOption()
#1 /var/www/html/local/laminas/vendor/laminas/laminas-cache/src/Storage/Adapter/AbstractAdapter.php(1470): Laminas\Cache\Storage\Adapter\Redis->internalGetCapabilities()
#2 /var/www/html/local/laminas/vendor/laminas/laminas-cache/src/Psr/SerializationTrait.php(24): Laminas\Cache\Storage\Adapter\AbstractAdapter->getCapabilities()
#3 /var/www/html/local/laminas/vendor/laminas/laminas-cache/src/Psr/SimpleCache/SimpleCacheDecorator.php(64): Laminas\Cache\Psr\SimpleCache\SimpleCacheDecorator->isSerializationRequired()
#4 /var/www/html/local/laminas/module/User/src/Handler/Api/LogoutHandler.php(58): Laminas\Cache\Psr\SimpleCache\SimpleCacheDecorator->__construct()
#5 /var/www/html/local/laminas/vendor/laminas/laminas-stratigility/src/Middleware/RequestHandlerMiddleware.php(46): User\Handler\Api\LogoutHandler->handle()
#6 /var/www/html/local/laminas/vendor/laminas/laminas-stratigility/src/Next.php(51): Laminas\Stratigility\Middleware\RequestHandlerMiddleware->process()
#7 /var/www/html/local/laminas/module/User/src/Middleware/SecurityMiddleware.php(38): Laminas\Stratigility\Next->handle()
#8 /var/www/html/local/laminas/vendor/laminas/laminas-stratigility/src/Next.php(51): User\Middleware\SecurityMiddleware->process()
#9 /var/www/html/local/laminas/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(76): Laminas\Stratigility\Next->handle()
#10 /var/www/html/local/laminas/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(65): Laminas\Stratigility\MiddlewarePipe->process()
#11 /var/www/html/local/laminas/vendor/laminas/laminas-mvc-middleware/src/MiddlewareController.php(57): Laminas\Stratigility\MiddlewarePipe->handle()
#12 /var/www/html/local/laminas/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Middleware\MiddlewareController->onDispatch()
#13 /var/www/html/local/laminas/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#14 /var/www/html/local/laminas/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil()
#15 /var/www/html/local/laminas/vendor/laminas/laminas-mvc-middleware/src/MiddlewareListener.php(80): Laminas\Mvc\Controller\AbstractController->dispatch()
#16 /var/www/html/local/laminas/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Middleware\MiddlewareListener->onDispatch()
#17 /var/www/html/local/laminas/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#18 /var/www/html/local/laminas/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil()
#19 /var/www/html/local/laminas/public/index.php(42): Laminas\Mvc\Application->run()
#20 {main}