-
in document, the example code:
I want to use |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Setting up the cache for a different adapter, in your case Redis, is very similar to what you have there <?php
use Phalcon\Cache\Cache;
use Phalcon\Cache\AdapterFactory;
use Phalcon\Di\FactoryDefault;
use Phalcon\Storage\SerializerFactory;
$serializerFactory = new SerializerFactory();
$adapterFactory = new AdapterFactory($serializerFactory);
$options = [
'defaultSerializer' => 'Json',
'lifetime' => 7200,
'host' => '10.4.13.100',
'port' => 6379,
'index' => 1,
];
$adapter = $adapterFactory->newInstance('redis', $options);
$cache = new Cache($adapter); |
Beta Was this translation helpful? Give feedback.
-
thank you! |
Beta Was this translation helpful? Give feedback.
Setting up the cache for a different adapter, in your case Redis, is very similar to what you have there
https://docs.phalcon.io/5.4/cache/#redis