Unable to cache static pages in ssg using opennext

// SSG configuration - optimized for static coin pages
import { defineCloudflareConfig } from "@opennextjs/cloudflare";
import staticAssetsIncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/static-assets-incremental-cache";

export default defineCloudflareConfig({
incrementalCache: staticAssetsIncrementalCache,
enableCacheInterception: true
});
// SSG configuration - optimized for static coin pages
import { defineCloudflareConfig } from "@opennextjs/cloudflare";
import staticAssetsIncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/static-assets-incremental-cache";

export default defineCloudflareConfig({
incrementalCache: staticAssetsIncrementalCache,
enableCacheInterception: true
});
# wrangler.toml
name = "laika-app"
main = ".open-next/worker.js"
compatibility_date = "2025-06-05"
compatibility_flags = ["nodejs_compat", "nodejs_compat_populate_process_env"]

minify = true

[assets]
directory = ".open-next/assets"
binding = "ASSETS"

[placement]
mode = "smart"
# wrangler.toml
name = "laika-app"
main = ".open-next/worker.js"
compatibility_date = "2025-06-05"
compatibility_flags = ["nodejs_compat", "nodejs_compat_populate_process_env"]

minify = true

[assets]
directory = ".open-next/assets"
binding = "ASSETS"

[placement]
mode = "smart"
I constantly see openext cache getting hit of of cf cache flag. Also, I have tried setting cache control through middleware, through _headers while but they all seem to be overridden by something I am not sure of.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?