PHP code example of b3n / typo3-predis-cache

1. Go to this page and download the library: Download b3n/typo3-predis-cache 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');

/* Start to develop here. Best regards https://php-download.com/ */

    

b3n / typo3-predis-cache example snippets


composer 

return [
   'SYS' => [
      'caching' => [
         'cache_pages' => [
            'backend' => \B3N\TYPO3\Cache\Backend\RedisBackend::class,
            'options' => [
                'defaultLifetime' => 0,
                'predis' => [
                    'options' => [],
                    'parameters' => [
                        'tcp://127.0.0.1:6379',
                    ],
                ],
            ],
         ],
      ],
   ],
];

return [
   'SYS' => [
      'caching' => [
         'cache_pages' => [
            'backend' => \B3N\TYPO3\Cache\Backend\RedisBackend::class,
            'options' => [
                'defaultLifetime' => 0,
                'predis' => [
                    'options' => [
                        'replication' => true,
                    ],
                    'parameters' => [
                        'tcp://127.0.0.1:6379?alias=master',
                        'tcp://127.0.0.1:6379',
                    ],
                ],
            ],
         ],
      ],
   ],
];