You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(core)!: route all caching through the cache override
The incremental cache and the tag cache stop running inside the server
function. They only live in the cache handler function now, and the server, the
middleware and the composable cache reach them through the `cache` override.
- Remove `incrementalCache` and `tagCache` from `OverrideOptions`; they are only
configured under `cacheHandler`. `resolveIncrementalCache` and
`resolveTagCache` follow. The esbuild resolve plugin keeps its own fields, so
adapter `defaultOverrides` are unaffected.
- Move tag revalidation - `hasBeenRevalidated`, `writeTags` and CDN
invalidation - out of `adapters/cache.ts`, `composable-cache.ts` and
`cacheInterceptor.ts` and into the cache handler, which now applies them in
`get`, `set` and `revalidateTags`.
- `Cache.get` takes the additional tags to check, so the caller no longer needs
the tag cache to resolve them.
- `defineCloudflareConfig` wires `cache` to the `OpenNextCache` entrypoint and
moves the incremental cache, the tag cache and the cdn invalidation to
`cacheHandler`; `ensureCloudflareConfig`, `populateCache` and
`isPurgeCacheEnabled` read the new location.
- Examples move to `cache: "local"` with a `cacheHandler` block.
BREAKING CHANGE: `default.override.incrementalCache` and
`default.override.tagCache` are replaced by the top level `cacheHandler` option
and `default.override.cache`.
0 commit comments