gnu-social/plugins/RedisCache
Diogo Peralta Cordeiro 6e031d623a [VersionBump] 2.0.0beta0
Updated composer and translations

composer install --no-dev
composer dump-autoload --optimize
git add vendor/ --force
make updatepo
2021-07-18 12:49:17 +01:00
..
locale [VersionBump] 2.0.0beta0 2021-07-18 12:49:17 +01:00
README [RedisCache] Added README with configuration instructions 2021-07-16 19:44:33 +01:00
RedisCachePlugin.php [RedisCache] Connections should not be shared by daemon threads 2021-07-16 19:44:40 +01:00

README

Redis cache for GNU social

Installation
============

Tell your `config.php` to use this plugin (replace `tcp://localhost:6379` with the address/port
of your Redis backend server):

addPlugin('RedisCache', ['server' => 'tcp://localhost:6379']);

Settings
========

servers: Array of Redis servers addresses. A semicolon (`;`) should be used to separate
the address from the port, to allow for IPv6 addresses

defaultExpiry: How long before cache expires (in seconds)

Example
=======

```
    addPlugin('RedisCache', [ 'server' => 'tcp://localhost:6379',
                              'defaultExpiry' => 86400 // 24h
                            ]);
```

You can also use a unix socket instead of a tcp connection:

```
    addPlugin('RedisCache', ['server' => 'unix:/var/run/redis/redis.sock']);
```