home User Guide Getting Started Help Center Documentation Community Training Certification
Looker keyboard_arrow_down
language keyboard_arrow_down
Enabling a Redis cache on a customer-hosted instance

Looker maintains a cache as part of each instance. Looker’s default cache is a custom caching solution that is based on several layers: in-memory, local disk, and remote disk. The Looker internal database is used as an index that identifies where cached objects are located in the system.

If you are hosting your own Looker instance, you can optionally configure Looker to use a separately hosted Redis cache. A Redis cache can provide the following benefits:


Looker supports Redis versions 4.0.x and 5.0.x. To use a Redis cache with Looker, your Redis instance must meet the the following requirements:

In addition, Looker’s GCM encryption system is required to use Redis in Looker. You must update encryption for instances that use legacy encryption prior to enabling Redis. If you attempt to enable Redis without GCM encryption, Looker will fail to start with an error message similar to the following:

2020-01-23 10:28:44.253 -0800 [ERROR|007e4|cache] :: Must enable GCM encryption to use Redis caching

For instructions on upgrading from legacy encryption to GCM encryption, see the Migrating to AES-256 GCM encryption documentation page.

Setting an environment variable to enable the Redis cache

To enable the Redis cache, you must set the LOOKER_REDIS_CACHE_DISCOVERY environment variable to point to the Redis connection URL and then do a complete restart of your Looker instance, including all nodes in the cluster. We recommend that you shut your server down completely, modify your environment and startup scripts as needed to include the environment variable, and then start all the nodes.

To shut down Looker, run the following commands on each node:

cd looker
./looker stop

Then, for example, if you have a local Redis instance on the same host at the default port, set the LOOKER_REDIS_CACHE_DISCOVERY environment variable as follows:

export LOOKER_REDIS_CACHE_DISCOVERY=redis://localhost:6379

Then restart Looker:

./looker start

Verifying that the Redis cache is enabled

To determine if your Redis cache is enabled, look for entries in your Looker log. There should be log entries similar to the following:

2021-06-11 16:54:41.532 +0000 [INFO|007e4|RedissonClientPool] :: Creating client for redis://localhost:6379/
2021-06-11 16:54:42.802 +0000 [INFO|007e4|cache] :: Creating render_cache DataShelf: redis