4 ms·
Programmatically purging caches is slow and costs extra. Just use normal cache-busting techniques like a different URL after a deployment. EDIT: Oops. Misread
by kccqzy 9y ago
Programmatically purging caches is slow and costs extra. Just use normal cache-busting techniques like a different URL after a deployment.
EDIT: Oops. Misread cloudflare/CloudFront.
- hamandcheese 9y agoThats fine for assets, but not at all ideal for pages.
- sgl75 9y agoChanging URLs is not really an option for html pages of a static site.
- jamiesonbecker 9y agoOnly for the root of a site, but there are better cache expiration options as noted elsewhere anyway. For inner pages, browsers do consider /your-page-url?v=1505418887 to be a completely different page from /your-page-url?v=1505418888. However, just expiring cache and/or properly setting HTTP cache control headers at most CDN's is a cleaner and more correct option.
- sgl75 9y agoI'm not following. How does that help my visitor see the latest version of the page when coming from a search engine or external site?
- jamiesonbecker 9y agoExactly, it doesn't. That's why you should use the actual cache mgmt options from your CDN provider, or just wait for your (properly configured) cache control headers to expire the cache (bear in mind that intermediate caching proxies don't always obey those TTLs or dates either). I was just pointing out that some people adjust their menu links (etc) to include some sort of dynamic variable (ie /?ts=xxx). I don't recommend this sort of scheme, though, except in unusual circumstances: IMO, it's fragile, leaky, and inefficient.
- manigandham 9y agoCloudflare and all other modern CDNs do this instantly and for free. Only the legacy ones take longer (usually minutes at most) and might charge a small extra.
- jsjohnst 9y agoAkamai takes far longer than a few minutes if you use all their POPs. It's in the 6-12hr range.
- deleted 9y ago[deleted]
- jsizzle 9y agoThis is not true. Purges on akamai take less than ten minutes for entire cp codes or specific objects. Deploying new cache rules is less than an hour in many cases
- jsjohnst 9y agoHow many POPs are you using? I can assure you, I am not wrong here and have internal knowledge of why if you are truly using all POPs it takes so long.
- notyourday 9y agoThat's not correct. Site delivery on Akamai globally is purged within several minutes
- jsjohnst 9y agoLook, I know what I'm talking about. Just because you can purge faster because of a different deployment doesn't mean that's the case for everyone. "Fast Purge" is not available for every type of deployment.
- tokenizerrr 9y agoNo it's not? It's free to just purge everything.