Redis

Cache tiles using redis or another redis-compatible key-value store.

Name should be "redis"

Configuration options:

Parameter Description Type Required Default

host

The host of the redis server. A convenience equivalent to supplying servers with a single entry. Do not supply both this and servers

String

No

127.0.0.1

port

The port of the redis server. A convenience equivalent to supplying servers with a single entry. Do not supply both this and servers

int

No

6379

db

Database number, defaults to 0. Unused in cluster mode

int

No

0

keyprefix

A prefix to use for keys stored in cache. Serves a similar purpose as db in avoiding collisions when multiple applications use the same redis

string

No

None

username

Username to use to authenticate with redis

string

No

None

password

Password to use to authenticate with redis

string

No

None

mode

Controls operating mode of redis. Can be standalone, ring or cluster. Standalone is a single redis server. Ring distributes entries to multiple servers without any replication (more details). Cluster is a proper redis cluster.

string

No

standalone

ttl

How long cache entries should persist for in seconds. Cannot be disabled.

uint32

No

1 day

servers

The list of servers to connect to supplied as an array of objects, each with a host and key parameter. This should only have a single entry when operating in standalone mode. If this is unspecified it uses the standalone host and port parameters as a default, therefore this shouldn’t be specified at the same time as those

Array of host and port

No

host and port

Example:

{
    "name": "redis"
    "mode": "ring",
    "servers": [
        {
            "host": "127.0.0.1",
            "port": 6379
        },
        {
            "host": "127.0.0.1",
            "port": 6380
        }
    ],
    "ttl": 3600
}