top | item 25332991

(no title)

gazelleeatslion | 5 years ago

Exactly. Little more clarification here though I think...

Flexibility of Cloudflare KV reads in general still yield quick enough results and make doing a quick and dirty cache a pretty good use case IMHO.

But Worker Sites specifically also use the Cloudflare Worker Cache runtime API — aka, per each POP, first reads of a route (index.html, blah.css, cat.jpg) are from KV and THEN cached indefinitely cutting that time to like 10ms.

This is taken then even further by using ETAG matching to make BrowserTTL indefinite (304s not 200s) on all assets until cleared cutting repeat visitors (regardless of POP) to basically nothing. Though .html for some reason doesn’t respect this (I think...).

Which to me is a GREAT deal!

Cache Object: https://developers.cloudflare.com/workers/runtime-apis/cache

Asset Mapper: https://github.com/cloudflare/kv-asset-handler/blob/master/s...

Lines 181 and 224

discuss

order

judge2020|5 years ago

You can link to specific lines on GitHub by clicking the line number, then the ellipses, then 'copy permalink' (you can also shift-click to select multiple lines). It also links to the current HEAD commit so the code won't change on you later on.