To see the complete documentation, check out Doctrine Cache
composer require sergiors/doctrine-cache-service-provider
use Sergiors\Silex\Provider\DoctrineCacheServiceProvider;
$app->register(new DoctrineCacheServiceProvider(), [
'cache.options' => [
'driver' => 'redis',
'namespace' => 'myapp',
'host' => '{your_host}',
'port' => '{your_portt}',
// 'password' => ''
]
]);
// $app['cache']->save('cache_id', 'my_data');
// $app['cache']->fetch('cache_id');
Something like this:
use Sergiors\Silex\Provider\DoctrineCacheServiceProvider;
$app->register(new DoctrineCacheServiceProvider(), [
'caches.options' = [
'conn1' => 'xcache',
'conn2' => [
'driver' => 'redis'
],
'conn3' => [
'driver' => 'array',
'namespace' => 'test'
]
]
]);
// $app['caches']['conn1'];
// $app['caches']['conn2'];
// $app['caches']['conn3'];
Be Happy!
MIT