---
summary: When the site shows stale content after a change.
title: Cache invalidation
path: troubleshooting/cache-invalidation
status: published
---

# Cache invalidation

Delivery caches at three layers: in-memory LRU → Redis → DB. The Redis
pub/sub channel `scaicms:cache:invalidate` carries invalidation messages
from backend to delivery.

## "I changed content and the site is still stale"

1. **Check the worker is running.** Index writes are queued, not synchronous.
   `ps aux | grep scaicms-worker`.
2. **Check the channel.** In one terminal: `redis-cli PSUBSCRIBE 'scaicms:cache:invalidate'`.
   Then change the content. You should see a message.
3. **Manual flush.** As a hammer:
   ```
   redis-cli FLUSHDB
   redis-cli PUBLISH scaicms:cache:invalidate "site:<site-id>:*"
   ```

## "I uploaded a new template pack but pages still use the old one"

Pack uploads invalidate the **pack** cache but not all content. Run the
manual flush above or restart the delivery process.

## "I updated my JWT secret"

JWTs from before the change are now invalid — delivery and backend both
reject them. Sign out and sign back in.
