PHP code example of sergiors / doctrine-cache-service-provider
1. Go to this page and download the library: Download sergiors/doctrine-cache-service-provider library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
sergiors / doctrine-cache-service-provider example snippets
use Sergiors\Pimple\Provider\DoctrineCacheServiceProvider;
$app->register(new DoctrineCacheServiceProvider(), [
'cache.options' => [
'driver' => 'redis',
'namespace' => 'myapp',
'host' => '{your_host}',
'port' => '{your_portt}',
]
]);
use Sergiors\Pimple\Provider\DoctrineCacheServiceProvider;
$app->register(new DoctrineCacheServiceProvider(), [
'caches.options' = [
'conn1' => 'xcache',
'conn2' => [
'driver' => 'redis'
],
'conn3' => [
'driver' => 'array',
'namespace' => 'test'
]
]
]);