Add support for the Next.js incremental cache handler API (cacheHandler / incrementalCacheHandlerPath) implemented against a Harper table, so Next.js ISR/full-route-cache data is stored and invalidated via Harper rather than the default filesystem.
Why
- Harper is already embedded alongside the Next.js app as a component.
- Using Harper as the cache store enables distributed cache invalidation across cluster nodes, persistent cache across restarts, and faster cache lookups from local Harper data.
Implementation
A CacheHandler class implementing get(key), set(key, data, ctx), and revalidateTag(tag) backed by a Harper table. Configured via:
// next.config.js
module.exports = {
cacheHandler: require.resolve('./harper-cache-handler'),
cacheMaxMemorySize: 0, // disable in-memory cache
}
🤖 Filed by Claude on behalf of Kris.
Add support for the Next.js incremental cache handler API (
cacheHandler/incrementalCacheHandlerPath) implemented against a Harper table, so Next.js ISR/full-route-cache data is stored and invalidated via Harper rather than the default filesystem.Why
Implementation
A
CacheHandlerclass implementingget(key),set(key, data, ctx), andrevalidateTag(tag)backed by a Harper table. Configured via:🤖 Filed by Claude on behalf of Kris.