Invalidate & Purge Automation

NitroPack.io manages its cache files in order to maximize the cases when cache can be served. In different scenarios, the extension will either purge or invalidate the generated cache, depending on the type of change that was made to a page.

Purge

A cache purge deletes the generated cache from your server immediately. This means that the extension cannot use the cache and has to let your server show an unoptimized page. Shortly after a user visits the page, it will get optimized, and your server will start showing the new refreshed cache, but until that happens the page will be slow.

Purging the cache is done when the changes to the page require that we start showing the new content right away, so we cannot use the previously generated cache. An example would be removing a product from your store - if the cache is not purged, the cached pages may contain links to a product that no longer exists.

NitroPack.io purges all cached pages or only affected ones depending on the type of change made to the store.

Invalidate

A cache invalidation does not delete obsolete cache files, it only marks them as stale. When there is a stale cache file for a page, the extension will show the stale cache, but will also schedule the page to be optimized again. The old cache file will continue to be used until the newly optimized cache is ready. This means that users will continue to see the old version of a page for a small amount of time after it has been updated, however, they will benefit from seeing cached and optimized pages more frequently.

Invalidating the cache is done when there are only minor changes to the content of a page. For example, updating a manufacturer's sort order will only invalidate the pages where that manufacturer is listed.

NitroPack.io invalidates all cached pages or only affected ones depending on the type of change made to the store.

The home page is always invalidated, not purged. This ensures that it will always be cached and optimized even if there is new content waiting to be optimized.

Cache warmup

Whenever the extension purges or invalidates a page, it will schedule it to be warmed up. This helps ensure that purged or invalidated pages get optimized again in a timely manner. See Cache Warmup for more details.