Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

benjaminhirsch/typo3-predis-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TYPO3 Redis caching backend

Instead of using the PHP extension "redis" like the build-in TYPO3 Redis caching backend, this one uses the predis (https://github.com/nrk/predis) library - so no PHP extension is required!

Most of this library is identical to the build-in redis backend, I simply changed the redis calls.

Installation

#####Composer

composer require b3n/typo3-predis-cache

Usage

#####Example single server configuration

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

#####Example configuration with replication

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',
                    ],
                ],
            ],
         ],
      ],
   ],
];

You can pass every setting like you would when you use predis directly. For more information please have a look here: https://github.com/nrk/predis#how-to-install-and-use-predis

About

TYPO3 Redis caching backend using predis

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages