HomeTyk v2.3 Documentation ComponentsCaching: Configuring a separate Redis cache

Caching: Configuring a separate Redis cache

For high-traffic systems that make heavy use of caching as well as rate limiting, it makes sense to separate out the Redis cache server from the Redis configuration server that supplies auth tokens and handles rate limiting configuration.

To enable a separate cache server, update your tyk.conf with the following section:

"enable_separate_cache_store": false,
"cache_storage": {
    "type": "redis",
    "host": "",
    "port": 0,
    "hosts": {
        "localhost": "6379"
    },
    "username": "",
    "password": "",
    "database": 0,
    "optimisation_max_idle": 3000,
    "optimisation_max_active": 5000,
    "enable_cluster": false
},

The configuration is the same (and uses the same underlying driver) as the regular configuration, so Redis Cluster is fully supported.

Was this article helpful to you? Yes No