There are quite a few reasons why NitroPack may automatically invalidate your website’s cache based on different actions and the platform used.
To start with, we should first explain the difference between cache Invalidation and cache Purge.
Invalidate only 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 immediately see the updated content. However, it won't be optimized for a while until NitroPack prepares the newly optimized content. Usually, this takes between a few seconds to a few minutes.
What cache files does NitroPack store on the hosting server?
NitroPack stores most of the resources of a website on our high-end CDN, but to provide a faster loading time, some of the cache files are stored on the hosting server of the website.
Per page, only two files are stored on the server:
The source code of the page (HTML of the page);
The critical CSS generated by NitroPack.
By default, the files are stored in the following paths for the different platforms:
💡 For convenience, NitroPack stores the different versions of the cache files in separate directories named desktop, mobile, and tablet.
When is the cache invalidated/purged on a WordPress website?
Below, you can find detailed explanations of when the cache is purged or invalidated for the NitroPack plugin on WordPress:
Actual operation performed
Message in the NitroPack logs
Navigation menu items are added, modified, or removed.
Invalidation of all pages due to modifying menu entries
Changes are made in WP->Appearance->Customize
Invalidation of all pages due to applying appearance customization
Custom CSS is added in WP->Appearance->Customize->Custom CSS
Invalidation of all pages due to modifying custom CSS
A new post has been scheduled to be published in the future, so the related cache needs to be cleared.
Invalidate related pages due to scheduling [Type] [Title]
A new post has been published.
Invalidate related pages due to publishing [Type] [Title]
An existing post is deleted.
Invalidate related pages due to deleting [Type] [Title]
Updating a published public post to a private one.
Invalidate related pages due to making [Type] [Title] private
If none of the above cases. A post is updated. This also clears anything found related to that post.
Updated [Type] [Title]
A comment has changed its status. Statuses include: hold, approve, spam, trash, etc.
Invalidation of [Title] due to changing related comment status
A new approved comment has been posted.
Related WP options:
WP -> Settings -> Discussion -> Comment must be manually approved
WP -> Settings -> Discussion -> Comment author must have a previously approved comment
Invalidation of [Title] due to posting a new approved comment
When downtime mitigation kicks in, all purge requests get added to a backlog file until the service becomes accessible again.
If this process takes too long, the integration deletes the backlog and sends a full purge request for this reason.
Full purge after backlog timeout
The website's theme is updated or switched.
Theme was switched or updated
When is the cache invalidated/purged on an OpenCart website?
We've taken special care to fine-tune the behavior of the NitroPack extension for OpenCart for different types of events. Here is a detailed explanation of the supported events of every entity:
The document above assumes you are generally familiar with OpenCart, and that you know the differences between Invalidate and Purge.
When is the cache invalidated/purged on a Magento website?
The NitroPack extension for Magento is still in BETA. The purge/invalidate events still need to be documented and will be released alongside the official version of NitroPack for Magento, which is coming out soon.
We've also developed an automatic cache purge for Magento websites. It takes into account all your product attributes and starts a cache optimization upon change. Here's a detailed explanation of the feature:
📌 If you need any assistance or have questions, you can always reach out to our support team at [email protected] or via our live chat.