After NitroPack optimizes the content on a page, the content is cached on your site and served to future visitors.
There are two ways to refresh this content - Invalidate and Purge.
Invalidate marks the cached content as "stale," but keeps serving it until newly optimized content is available. As a result, your visitors always see optimized content, even though it may be outdated for a short while.
Purge deletes the cached file from your site, meaning your site visitors will see the updated content immediately. However, the content won’t be optimized until NitroPack performs new optimizations.
So, you update the content and invalidate or purge the cache. After that, one of two things will happen, depending on the “Cache Warmup” feature:
If you’ve turned Cache Warmup off, NitroPack will optimize the content when someone makes an organic visit to the invalidated or purged page.
If you have the feature on, the moment you change the content (invalidate or purge the URL), NitroPack will optimize the URL without anybody visiting it. In a way, the “Cache Warmup” feature acts like a human and visits the URL automatically instead of you or someone else visiting the URL.
Important: NitroPack doesn’t automatically detect changes to CSS and JS files. In such an event, you should do a full Cache Purge after uploading your new CSS/JS file.
Lastly, in some cases, aggregate pages (like blog pages) might not get automatically optimized when one of the pages (like individual blog posts) is edited, or a new onе is published. If this is an issue for your website, please refer to our article on aggregate pages.