Cache invalidation is a process where the computer system declares the cache entries as invalid and removes or replaces them.
The basic objective of using cache invalidation is that when the client requests the affected content, the latest version is returned.
There are three defined methods to invalidate a cache:
Purge
:
Purge
removes the content from the proxy server instantly. When the client demands data again, it is fetched from the application again and stored in the proxy server before being returned to the client. This method eliminates all variants of cached content.
Refresh
:
This method fetches the content from the application even if it is available. Even the content stored in the cache is replaced with the new version of cache content.
This method only has an impact on a single variant of the content.
Ban
:
Ban does not withdraw content from cache instantly. Instead, it creates a reference to the content and adds that to the blacklist. When the client makes a request, it is checked with the blacklist. If a match is found, new content is fetched again from the application and stored in the proxy being returned to the client before.