I have no revalidate params. Why are my Data Cache reads + writes so high?

I’m being billed for millions of Data Cache reads and writes for my Next.js app. I’ve removed the “revalidate” parameter from all calls. I don’t understand the value of the Data Cache reads and writes. Can I turn this off? How can I find what pages are reading and writing to the Data Cache?

My plan has ballooned from $20/month to over $100/month with no change in traffic. I’ve read through the docs (Manage and optimize usage for Data Cache) and removed all revalidate parameters from my call but for some reason I’m still getting billed for millions of reads and writes. I’ve created a support case but there has been total radio silence.

How do I stop being billed for these Data Cache reads and writes?

1 Like

Hi, @connor11528! Welcome to the Vercel Community :smile:

Here’s our documentation on using Vercel Data Cache, it might be helpful! Do you have any specific questions that isn’t answered in the docs?

You could try setting the Cache-Control header to no-store, max-age=0, s-maxage=0 in your vercel.json or next.config.js file. This configuration should prevent caching of HTTP responses.

You can monitor your Data Cache usage from the dashboard: https://vercel.com/connor11528/~/usage Is that what you’re looking for?

Feel free to give us more information on your set-up, but if you haven’t already, it might be worth considering Incremental Static Regeneration (ISR) where possible, as it can help reduce the number of Data Cache operations.

Let us know how you get on!

for #1 value. The only thing I’m seeing in the docs that articulates the value is:

Frameworks that integrate with the Data Cache (currently Next.js) are able to cache data per fetch instead of per route. This means you can have static, dynamic, and revalidated data together in the same route.

Why does it matter to cache per fetch instead of per route? I’d be happy to have my pages cached on Nginx or a CDN for a fraction of what Vercel is charging me. The documentation says what the Data Cache is but not why it helps me or why I should pay for it.

#2 Setting cache control headers. I’ve tried that in my Next config file for my highest bandwidth routes but have see zero reduction in data cache writes or reads. It would be great to have page caching as my site is static but charging $100+ dollars per month for caching static pages is ridiculoud imho.

This is the cache control headers I set:

async headers() {
return [
{
source: ‘/companies/:company’,
headers: [
{
key: ‘Cache-Control’,
value: ‘public, s-maxage=86400, stale-while-revalidate=43200’,
},
],
},
{
source: ‘/jobs/:slug’,
headers: [
{
key: ‘Cache-Control’,
value: ‘public, s-maxage=86400, stale-while-revalidate=43200’,
},
],
},

#3 I wanted to see what pages were doing these millions of reads and writes. This wasn’t at all clear by the usage dashboard that just shows the number of reads or writes per project per day. I was interested in removing these reads and writes so I needed to know what pages they are happening on.

What I’m using now is the Usage > Networking > Top Paths to see our most expensive pages

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.