Data Studio does not bypass the data cache (sends Cache-Control: no-cache, not no-store) — stale until TTL

Summary

On a self-hosted, multi-instance Directus deployment with the data cache enabled
(CACHE_ENABLED=true, CACHE_STORE=redis), the Data Studio shows stale content
until CACHE_TTL expires
, then all changes appear at once. I traced this to the
Studio’s data read requests not sending Cache-Control: no-store, so the server
never skips the cache for the Studio. I’ve confirmed in source that the admin app /
SDK set no Cache-Control request header on both 11.17.4 and the latest
12.4.0. Looking for confirmation of whether this is expected, a known issue, or
something I can configure.

Environment

  • Directus 11.17.4 (self-hosted), multiple instances behind a load balancer.
  • Also checked source for 12.4.0 (see below).
  • Cache config:
    • CACHE_ENABLED=true
    • CACHE_STORE=redis (shared Redis/Valkey)
    • CACHE_TTL=5m
    • CACHE_SCHEMA=true
    • CACHE_STATUS_HEADER=X-Cache-Status
    • CACHE_AUTO_PURGE=true
    • CACHE_SKIP_ALLOWED=true

Expected

Per the docs and prior maintainer statements, the Data Studio should send
Cache-Control: no-store on its data reads so editors always see live data, while
public API consumers keep being served from the cache.

Actual

  • The Studio’s collection list/layout reads are served from the Redis data cache and
    stay stale until the 5m TTL elapses.
  • In Chrome DevTools (with “Disable cache” ON), the Studio request carries
    Cache-Control: no-cache, NOT no-store. Example:
    GET /items/my_collection?limit=25&fields=...,status,id&sort[]=id&page=1&filter[status][_neq]=archived
  • Since the server cache-skip only honours no-store (api/src/middleware/cache.ts),
    no-cache has no effect and the response is a cache HIT.

What I verified

  1. Server honours no-store correctly. With CACHE_SKIP_ALLOWED=true, a curl to
    the same endpoint with Cache-Control: no-store returns X-Cache-Status: MISS
    every time; without it returns HIT. So the server works as intended.
  2. The Studio isn’t sending no-store. In the admin app source, neither
    app/src/api.ts (axios instance) nor app/src/sdk.ts (@directus/sdk + ofetch)
    sets any Cache-Control request header. Confirmed in source for both v11.17.4
    and v12.4.0.
    The no-cache seen in the browser appears to be the browser default,
    not a header Directus sets. So upgrading to v12 does not change this.
  3. Not my infrastructure. No CDN in front of the Directus domain; the load balancer
    rules are plain forwards with no header rewriting; no custom extension sets a request
    Cache-Control.

Questions

  1. Is the Data Studio expected to send Cache-Control: no-store on collection item/list
    reads in 11.x / 12.x? If so, where is it set, and could the collection layout/list
    query path be omitting it?
  2. If the Studio only relies on the browser’s no-cache (which the server ignores), how
    is the Studio meant to show live data when the data cache is enabled on a shared Redis
    store across multiple instances?
  3. Is there a supported way to make the Studio bypass the data cache on a multi-instance
    deployment, so editors see live data while public reads stay cached?
  4. Related: with CACHE_AUTO_PURGE=true on multiple instances, a publish (version
    promote → item update) did not invalidate the shared cache in my testing (public read
    stayed HIT/old). Is auto-purge expected to clear the shared Redis cache for all
    instances on mutation?

Minimal reproduction

  1. Self-hosted Directus 11.17.4 (or 12.x), 2+ instances, CACHE_ENABLED=true,
    CACHE_STORE=redis, CACHE_TTL=5m, CACHE_STATUS_HEADER=X-Cache-Status.
  2. Open a collection in the Data Studio.
  3. Change an item via the API/DB (or observe after another user’s edit).
  4. The Studio list view shows the old value until the 5m TTL elapses.
  5. DevTools shows the Studio request carries Cache-Control: no-cache (not no-store).