Caching · Content tag
Browse content discussing caching.
37 matching items
Cases · 17
Aaron Edwards: an accidental $1,200 D1 bill.
Aaron Edwards (@uglyrobot), replying to Jay’s D1 thread, says he had an accidental $1,200 D1 bill last month and advises caching reads heavily.
Reported amount · USD
$1,200
Meathill: OpenNext KV ISR cache left unpaid TTL work and ballooned storage.
Meathill reports that an OpenNext Cloudflare KV incremental-cache path for Next.js ISR left a TODO for KV TTL, so versioned page snapshots accumulated. Dashboard billable storage showed 3.59 GB-month over the 1 GB free allowance with ongoing extra charges, and historical zombie data reached about 24 GB before he moved to a new namespace. He does not state a dollar invoice total.
Reported amount · USD
Not disclosed
A voting page polling every three seconds: the author revises a $1,000 report.
@keking99 first reports about $1,000 for a voting page polling /api/result every three seconds. A later post reports $816.52 in accumulated usage as of October 4 and cites another screenshot total of $817.14. He later says his support ticket keeps being refused.
Reported amount · USD
$816.52
Meathill: a Next.js prefetch loop, then R2 operation charges two months running.
Meathill (@meathill1) says a Next.js 16.3.x bug caused infinite prefetching that exhausted his Worker quota in September, used up the month’s Class A operations, and later made ISR caching cost more than Workers. In October he says a blog’s 404 pages going through ISR drove R2 Class A operations up again. He gives no amount.
Reported amount · USD
Not disclosed
Indie game studio: R2 Class B re-fetches from a short cache TTL drove a $262.18 cycle.
teambrickstream reports a Jul 27–Aug 26 cycle totaling $262.18, of which $259.20 was R2 Class B operations (about 729.61M operations). Game images on a custom domain inherited a 4-hour origin Cache-Control as edge TTL, so unchanged files were re-read from R2 after each expiry. A $10 default budget alert fired on Aug 1 at $38.87 with subject “spending limit reached,” then spending continued for 26 more days. The author asks whether any portion can be credited and how to open a Billing case on the Free plan.
Reported amount · USD
$262.18
nuvempro.com.br: Argo billed 18,120 GB (USD 1,812.30) while only 4.41 GB was uncached origin traffic.
guilherme7 reports an Argo Smart Routing invoice of USD 1,812.30 for 18,120 Accelerated Gigabytes in the Jul 9–Aug 8 window, while zone analytics showed 18.05 TB total bandwidth almost entirely cached and only 4.41 GB uncached to origin. He says billing docs state cache hits avoid Argo routing charges, that he opened a billing case still in New status, disabled Argo, and asked for a hold or written confirmation that paying would not prejudice the dispute.
Reported amount · USD
$1,812.30
Kent C. Dodds: full-table D1 aggregates produce a $195.05 rows-read line item.
Kent C. Dodds links a pull request on X calling it "an unfortunate lesson". The pull request says the Aug 8, 2026 Cloudflare invoice ($213.79 total) included a $195.05 D1 line item for 195 billion rows read (Jul 8–Aug 7), mostly attributed to two full-table PostRead aggregates cached only in per-isolate memory. The change moves those results to a shared KV-backed cache.
Reported amount · USD
$195.05
philonl: Smart Shield Argo bills 15 GB a day while analytics show 2.9 GB of traffic.
Community user philonl says daily Smart Shield Argo charges look far higher than actual traffic: on one day, billable usage shows 15 GB of Argo Accelerated Gigabytes at $1.50, while HTTP traffic analytics and the caching overview both show 2.9 GB of data transfer, most of it served by Cloudflare. The author cites the docs saying cached responses avoid Argo charges, calls the daily charges 30 times higher than actual traffic, and opened ticket 02272315.
Reported amount · USD
Not disclosed
wenzengsheng: a $4.88 refund request after accidentally enabling Cache Reserve.
Community user wenzengsheng (pvecloud.site) requests a refund for an unexpected $4.88 charge believed to come from accidentally enabling Cache Reserve, which has since been cancelled. The author says the support portal is stuck in a self-help loop without a create-case button and that email to billing@cloudflare.com bounced.
Reported amount · USD
$4.88
A crawler hitting a 380k-page sitemap drove 800 billion D1 row reads and an $800.03 charge.
Community user faithalarmapp says Google crawling a 380,000-page sitemap generated 800 billion D1 row reads in one week (June 22 to 28, 2026), an unexpected $800.03 charge, and asks for a goodwill credit. A Cloudflare Customer Reliability Engineer replied that the payment redirect on the dashboard can be clicked through to open a billing ticket. After fixing caching and redirects, the author reports about four weeks later that the support case has no resolution and that the account was downgraded to the free tier.
Reported amount · USD
$800.03
D1 row reads: a $134.14 invoice from unindexed queries.
Justin Ahinon reports that his April 21, 2026 Cloudflare invoice was $134.14, with $127.60 from 127,599,130,859 D1 row reads on a 765,000-row database. He attributes it to full table scans in queries that ran on every page load.
Reported amount · USD
$134.14
munaladhikari2062: $4.50 for 377 Cache Reserve Class A operations billed as a full million.
Community user munaladhikari2062 (CSIT Notes Hub) asks for a one-time courtesy credit for a $4.50 charge, saying they were unaware that 377 Cache Reserve Class A operations would trigger the full million-unit minimum billing increment. The author has disabled Cache Reserve and opened case 02070539 on April 14 with no response after 11 days. Other users in the thread say support is slow to respond to existing tickets.
Reported amount · USD
$4.50
contact.freeicon: inefficient D1 queries produced about $748 in four days.
Community user contact.freeicon, running a non-profit free icon library on cloudflare-icon.pages.dev, reports unexpected D1 charges of about $748 from April 13–17, 2026 after a LEFT JOIN GROUP BY query scanned about 6.4 million rows on every page request and bot crawling drove about 200 billion reads. The author replaced the query with a pre-computed indexed column and 72-hour KV caching.
Reported amount · USD
$748
coox.in: image caching that resets monthly drove 116,226 Image Transformations and higher bills.
Community user deepshikha.jain.coox (coox.in) says images seem to stay cached for only about a month before being reprocessed, causing 116,226 unique image transformations from January 1 to 20 without new images or traffic changes, and higher billing. The author also reports two possible duplicate charges of ₹6,426.42 and ₹6,425.13 in late December, has contacted support with no response, and requests an urgent review. A community MVP replies that Image Transformations are priced per unique transformation per month. Amounts are in Indian rupees, so no USD amount is recorded.
Reported amount · USD
Not disclosed
dineshcms1: $5.75 Cache Reserve charges after the subscription was cancelled.
Community user dineshcms1 says a $5.75 Cache Reserve charge (reads, writes and storage) appeared although the Cache Reserve subscription was cancelled on November 24 and has been off since. The author says the support ticket only produced automated replies about how to cancel and asks for a human review of the billing error.
Reported amount · USD
$5.75
colab061215: a $4.88 minimum bill for a few cents of Cache Reserve and R2 usage.
Community user colab061215 says a $4.88 invoice appeared although the account did not knowingly use paid services; actual Cache Reserve and R2 metered usage was under $0.05, but the system generated a $4.88 minimum bill. The author checked billing usage and settings, disabled anything that might charge, and submitted billing ticket 01849980 in the Refunds area.
Reported amount · USD
$4.88
alan29: Argo Accelerated Gigabytes billing doubled with no traffic increase; the dashboard showed 0.0% of requests optimized.
Cloudflare Community user alan29 says billing for Argo “Accelerated Gigabytes” doubled in the month with no corresponding increase in traffic, while the Argo dashboard said “Argo Smart Routing is optimizing 0.0% of requests to your origin,” so Argo appeared not to be working. The author says the increase seemed to correlate with turning on Tiered Caching and Cache Reserve, that support did not help, and later posts ticket 01124964. No dollar amount is given.
Reported amount · USD
Not disclosed
Guides · 20
木豚Moku: Argo may still bill on a cache hit; free R2 egress does not mean images that pass through an Argo-enabled domain are free
On 2026-11-25, X user @wohaoz (木豚Moku) writes: one Cloudflare Argo billing pitfall is that it does not charge only for cache-miss origin traffic; traffic the domain delivers to visitors may still count toward Argo even on a cache hit. So free R2 egress does not mean cover images that pass through a domain with Argo enabled are also free. To isolate this cost, images should be served directly from another independent domain zone that does not have Argo enabled; merely switching to another subdomain under the same root domain does not isolate it. The author says that after the covers were moved out, Argo usage dropped noticeably. The body is complete (note_tweet matches the displayed text). The accompanying images were not OCR’d. This is the author’s observation, not the full text of an official rule.
Overseas BabyChang: One domain to master the Cloudflare free stack; the quota table and the six pitfall tables could not be embedded in the body, so the article is not marked complete
On 2026-11-24, X user @Thuweni1 (Overseas BabyChang) posted a short post and attached the article “Master Cloudflare with One Domain: Freely Set Up a Website, Mailbox, Image Host, and AI API.” The short post says one domain plus the free plan can set up a website, a domain mailbox, an R2 image host, and a free AI API, and that the account is handed to an Agent to manage with the cf command line. The article plain_text stops at the heading “Quick reference: free quotas and the most common pitfalls.” Code blocks such as the quota table and the six pitfall tables are in article.entities.code; because they have no position in the body, they have been archived as unplacedBlocks, and the article cannot be marked complete. The author states that quotas follow Cloudflare’s official documentation and may be adjusted later.
风易: Do not call the upstream response live every time; use the Cache API for edge caching
On 2026-11-18, X user @Michael_liyang (风易) wrote: do not call the upstream response live every time; use the Cache API for edge caching. The approach is: the request checks the Cache API first and returns directly on a hit; on a miss, call upstream, write the successful response into the cache with a TTL; write operations do not enter the cache, and the hit rate is recorded in the D1 daily report. The chain is request → check cache → return on hit → call upstream on miss → write back → return. The author's judgment: what is cached is the upstream result, not your business state.
风易: What cache fears most is looking up things that do not exist; a crawler scanning random keys makes every request hit D1
On 2026-11-16, X user @Michael_liyang (风易) wrote: what cache fears most is looking up things that do not exist. A crawler scans random keys, penetrates every time, and hits D1 directly, so the cache is added for nothing. The approach is to cache empty results as well, and give the TTL only 5 minutes; log high-frequency nonexistent keys to D1, and blacklist them once confirmed to be a crawler. The chain is request → check cache → return on hit → query D1 on miss → write an empty-value cache if it does not exist. The author's judgment: the cache prevents repeated lookups; it does not block lookups of nonexistent things on the database's behalf.
Workers AI and AI Gateway: free Neurons, paid models and the September 24 logging cut-off
Su (@Sukiea1008) separates what is free and what is billed when adding AI: Workers AI gives 10,000 Neurons a day but some models need Workers Paid or prepaid credits; AI Gateway’s analytics, caching and rate limiting are free while model calls are not; and gateway logging rules depend on whether the account first created a gateway before or after 2026-09-24.
Running a job board on Workers Free: error 1102, D1’s 50 queries per request, and shared egress IPs
SagaSu (@sujingshen) describes keeping DMtheFounder on the Workers Free plan: SSR CPU of P50 54 ms against a 10 ms limit caused error 1102 until he edge-cached anonymous pages, an admin job hit D1’s 50-queries-per-invocation limit until he batched writes, and IndexNow 429s came from shared Workers egress IPs.
A free Workers AI tool: hash the input and check KV before calling the model
风易 (@Michael_liyang) shares a five-parameter loop for a free AI tool: clean and validate input, use a truncated SHA-256 hash as a KV cache key for 24 hours, and only call Workers AI on a cache miss, capping max_tokens.
R2: free egress does not mean free reads for AI image and video sites
檀奕 (@yunxi0623) reminds AI image and video tool builders that R2 waives egress bandwidth but still meters operations, with a theoretical example where 20 million reads a month cost about $3.60 beyond the free tier; 何陋轩主人 (@HelouMaster) posted the same text and added a caching tip.
From 18 months at $0 to $72 a month: Meathill's Cloudflare bill review
Meathill breaks down 49 Cloudflare charges across 20 domains and a dozen projects, separating registrar renewals from the monthly usage bill and naming four cost traps: uncached Worker responses, Images, Workers Observability and cache placement.
Moving a blog to EmDash on the D1 free tier: row reads ran out and the author rolled back twice
tozai (@ccietry_tozai) tried moving a WordPress blog with about 800 daily unique visitors and 7,000 page views to EmDash on Cloudflare, exceeded D1’s 5 million daily rows-read free limit, and went back to WordPress rather than move to a paid plan without a hard cap.
Next.js ISR on OpenNext + Workers KV: why the cache never expires and how to cap it
Meathill traces a KV storage overage on his own site to OpenNext's KV incremental cache writing keys without a TTL and keeping every deploy's build-prefixed snapshot, then shows how he rebuilt the cache lifecycle.
How I keep Cloudflare under $5: where surprise bills come from
Ashish Sharma (@sarmaasis) runs several sites on the $5 Workers Paid plan and lists, product by product, the usage patterns he says quietly run up a Cloudflare bill, ending with a 12-item checklist.
Four layers of cost protection for small Cloudflare projects
David Z (@davezfr) writes an X article for vibe coders on budget alerts, stop conditions for paid paths, automatic pausing, and letting a personal agent verify and pause.
OpenNext on Cloudflare: 7.87M R2 reads from cache hits and 10M Worker requests from a prefetch loop
Meathill debugs two back-to-back cost spikes on a Next.js 16 site on Workers: background R2 reads on every RegionalCache hit, then an infinite _rsc prefetch loop from OpenNext cache interception, with the config changes that stopped each.
Why Next.js images got expensive on Cloudflare: route them through /cdn-cgi/image and cache them
Meathill explains why the default /_next/image endpoint on OpenNext was uncacheable and rerun on every request, and replaces it with a custom loader to Cloudflare Image Transformations plus a long Cache Rule.
Cloudflare cost playbook
A community playbook for Cloudflare cost retrospectives, cost models, and code review.
Optimize costs
Cloudflare lists ways to find and reduce usage-based charges by product.
Stream pricing: minutes stored and minutes delivered
Cloudflare’s Stream pricing page explains the two billed dimensions, how delivered minutes are counted from segment requests, and how Media Transformations are billed; billing for WebRTC delivery began on October 15, 2026.
Cutting a D1 bill 95% with composite indexes, ANALYZE and a KV cache
Justin Ahinon walks through finding the four queries behind 127.6 billion D1 rows read and fixing them with indexes, ANALYZE and cache-aside KV for layout-level data.
Estimating a SaaS bill on Cloudflare Workers by billing unit, not by MAU
李辰 of 小李出海笔记 argues that a Cloudflare SaaS bill cannot be read off monthly active users and walks through Workers, D1, R2, Workers AI and Vectorize by their own billing units, with an estimation template and a checklist.