b3n/typo3-predis-cache

This package is abandoned and no longer maintained. No replacement package was suggested.

TYPO3 backend cache based on predis

Installs: 636

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 0

Type:typo3-cms-extension

1.0.0 2017-01-14 11:48 UTC

This package is auto-updated.

Last update: 2023-02-02 18:54:08 UTC


README

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