How often does Akamai refresh cache?
We use Akamai to cache frequently accessed files. When uploading and overwriting files to the Akamai FTP, I can't see the new file reflected live.
Anybody have any experience with this?
How often does Akamai refresh cache?
We use Akamai to cache frequently accessed files. When uploading and overwriting files to the Akamai FTP, I can't see the new file reflected live.
Anybody have any experience with this?
It is configurable. You will need to talk to whoever in your organisation manages your Akamai account. They will have access to change how and what things are cached. If necessary, they can put you in touch with a technical contact at Akamai.
Bear in mind that the files may be cached elsewhere as well, including at any proxy servers that the client is behind or in the browser's cache itself. An easy way to get around this is to add a query string to the URL, and change the value each time you update the files, or set it to a random value to bypass the cache each time. The server will ignore the query string, but the browser and proxies will think it is a completely different URL and re-request it.
For instance, instead of requesting:
styles.css
request:
styles.css?version=1
It is configurable. You will need to talk to whoever in your organisation manages your Akamai account. They will have access to change how and what things are cached. If necessary, they can put you in touch with a technical contact at Akamai.
Another thing to check is the time to live set for items Akamai caches.
I use Akamai at work, recently found that it will cache indefinitely anything with a max-age of zero. Then when I'd corrected that to something more useful, it randomly returned old and new items from the same url. You could see in the header content that the old items, in this case PDF files, still had a max age of zero, where as the current PDFs had the new max age value.
To remedy this we had to clear the urls from Akamai so that it cached new versions of the PDFs, using the corrected max age value. Now the effected PDFs only stay cached for the new max age time, and we consistently receive the correct versions.
Files on the Akamai network can be tuned with whatever cache configuration the end customer requires. Typically the two most common approaches to cache design I see are:
If you enable the following pragma headers to your request then you can inspect the HTTP response headers and determine the cache length of the file - it's included in the cache key.
Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no, akamai-x-get-request-id,akamai-x-get-nonces,akamai-x-get-client-ip,akamai-x-feo-trace
e.g the following indicates a file cached for 4 days:
x-cache-key:S/L/3568/82745/4d/mirror-somedomain.akadns.net/contentimages/meganav/020118/2018-02-01-someimg.jpg cid=_site_locale=us&site_language=en_
© 2022 - 2024 — McMap. All rights reserved.