There are a variety of caching strategies you can implement for your content. This chart provides a snapshot of benefits for each.
No-cache: With this strategy, you keep things simple, operationally efficient, and always up to date by not caching any objects at the edge. This approach, however, sacrifices offload/performance because the full workload remains on your origin infrastructure rather than being distributed to edge servers.
Short TTL: You can cache content at the edge with a short TTL that automatically limits the lifespan of the data. This method provides better offload/performance than No-Store for the most popular content, but isn’t ideal because the short TTL automatically gets rid of content even if it’s the correct, up-to-date version. Less-popular content will often have cache misses because the short TTL may have discarded the data before it was requested, causing undue strain on the origin.
Long TTL: With this strategy, the TTL is increased, which delivers higher offload/performance than the short TTL method because the data resides on edge servers for a longer period. However, the risk of being out of date increases for the same reason: the data sits on the server for a longer period before the TTL discards the data, so it’s more likely to become out of date. This, in turn, increases the chance that your team will have to intervene to manually update the data, which reduces operational efficiency.
Purge content by URL is a popular and powerful method, but you must painstakingly catalog every URL you want to purge; that can include all image variants, all PDP variants, all indices of a paginated page, and many more parameters. Plus, if you miss a URL, omit an extra query parameter for example, then the content will not be purged, which can affect user experience, legal liability, and/or brand reputation. You also need to take into account the rate limiting restrictions of the Fast Purge API.
Purge content by cache tag allows you to invalidate all content marked with a specific cache tag and maximize offload to the edge servers.
This video explains the basic concepts and technology of caching.
Learn more about caching options.
Updated over 1 year ago