How to clear the Redis cache

Flush the Redis cache on TurboStack with the CLI, what it does and does not touch, and what to expect afterwards.

Clear the Redis cache when cached data has gone stale - for example after a deploy, a configuration change, or while troubleshooting. TurboStack runs two Redis instances, so it matters which one you clear: the cache instance (6379) holds throwaway data, while the persistent instance (6378) holds sessions and queues you do not want to lose.

Clear the cache with the TurboStack CLI

tscli redis clear is the usual way. It runs redis-cli flushall against the cache instance (6379), clearing all of its databases. The persistent instance (6378) is left untouched, so sessions and queued jobs survive.

tscli redis clear

Expect a short performance dip while the cache fills again.

Clear a single database or the persistent instance

For finer control, use redis-cli directly (it connects to the cache instance on 6379 by default):

redis-cli -n 1 FLUSHDB        # clear only database 1 on the cache instance (6379)
redis-cli -p 6378 flushall    # clear the persistent instance - drops sessions and queues

Prefer your application's own flush

When you only need to clear one application's cache, its own command is safest because it touches just that application's keys. For example, Magento:

php bin/magento cache:flush

After clearing

The cache rebuilds on the next requests, so the first hits are slower and load is briefly higher. Warm the important pages by visiting them, or let your sitemap or a crawler do it, before judging the result.