Cache adapters: support host-aware cache identity for multi-host Workers
Author: shrinidhi4uCreated Sep 29, 2026Updated Sep 29, 2026
One Worker serves many tenants on different Custom Domains
(<tenant>.example.com), and every page renders per host. Today:
appIsrCacheKey/isrCacheKeykey on pathname (plus build id) only;- Workers Cache keys on path, query, entrypoint,
ctx.props, and version, not host; - the Response Store keys on the path without the query.
So no built-in adapter can share cached responses safely across hosts. We
work around it with a single default-entrypoint cache, Vary: Host, and one
shared purge tag, which means we can't use workersCacheCdnAdapter,
responseStoreAdapter, or --warm-cache. --warm-cache also warms only the
first configured domain.
Ask: an adapter option (or a request-stage hook) that adds the host, or an
app-derived tenant id carried as ctx.props, to the response and ISR cache
identity; and cache warming across all configured domains.
Source: cloudflare/vinext