How I cut my Cloudflare bill in half by switching from Durable Objects to static assets cache
I got my Cloudflare invoice in December and noticed something odd: $12.50 for Durable Objects.
Durable Objects are Cloudflare's way of storing data that needs to persist between requests (stateful serverless computing), like live chat messages, multiplayer game state, or collaborative editing.
I have a few websites hosted on Cloudflare, and most of them are basically static blogs. Why was I paying for Durable Objects?
The culprit: OpenNext's default caching
If you're using OpenNext to deploy Next.js on Cloudflare Workers, the default configuration uses Durable Objects for ISR (Incremental Static Regeneration) cache invalidation. This makes sense for dynamic sites that need on-demand revalidation, but for a blog? Complete overkill.
Here's what the default config looks like:
// open-next.config.ts (default)
import { defineCloudflareConfig } from "@opennextjs/cloudflare";
export default defineCloudflareConfig();This innocent-looking config enables:
- DOShardedTagCache: Durable Objects for tag-based cache invalidation
- BucketCachePurge: Durable Objects for cache purging
- DOQueueHandler: Durable Objects for queue handling
All of which cost money every time they're invoked.
The fix: Static assets cache
If your site is mostly static (like a blog), you can switch to a static assets cache that stores everything in Workers Static Assets at build time. No Durable Objects, no recurring costs.
// open-next.config.ts (optimized)
import { defineCloudflareConfig } from "@opennextjs/cloudflare";
import staticAssetsIncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/static-assets-incremental-cache";
export default defineCloudflareConfig({
incrementalCache: staticAssetsIncrementalCache,
enableCacheInterception: true,
});That's it. Two lines of config change saved me $12.50/month.
The trade-off
There's one catch: you lose ISR revalidation. With static assets cache, your content only updates when you redeploy. For a blog where I control when content changes, this is perfectly fine. I deploy when I publish a new post anyway.
But if you have:
- User-generated content that updates frequently
- Pages that need to revalidate on a schedule
- Dynamic data that changes between deploys
Then you probably need Durable Objects, and the cost is justified.
Results
Update (January 2026): I know, it's not a lot of money, but my January invoice for all my sites came in at just $6.47. I applied this fix to all of them, and the Durable Objects charge is gone.
| Service | December | January |
|---|---|---|
| Durable Objects | $12.50 | $0.00 |
| Workers Paid | $5.00 | $5.00 |
| AI Neurons (RTN)* | $8.31 | $0.42 |
| Workers CPU | $0.42 | $1.00 |
| Vectorize | $0.05 | $0.05 |
| Total | $26.28 | $6.47 |
*Also optimized my chatbot's AI usage separately, which accounts for most of the RTN savings.
How to check if you need Durable Objects
Ask yourself:
- Does my content change between deploys? If no, use static assets cache.
- Do I use
revalidatein my Next.js pages? If no, use static assets cache. - Is my site mostly a blog or documentation? If yes, use static assets cache.
For most personal sites and blogs, static assets cache is the right choice. Save your money for something more useful.