Find the answers you need

Support Database

When does StackCache clear my cache automatically?

Our inbuilt StackCache plugin stores your site files and content locally to get the best-possible speeds out of your WordPress website.  

However, when you’re working on your site, you’ll want to make sure any changes you do make are reflected on the site itself. As such, we’ve integrated rules that StackCache follows automatically so that it clears the cache to show the latest renditions of your site. 

Depending on the type of changes made to the site, different amounts of content will need to be cleared. Below is a full breakdown of the different types of cache clear that StackCache does automatically, and what triggers these to be cleared. 

Events that fully purge the WordPress site cache 

Changes made to the WordPress site that affect the whole site, such as swapping the site’s theme, will need a clear of the entire site’s current cache. So we purge the cache for the whole site in the case, including all pages and resources. 

Here’s a list of events and actions that will trigger this type of purge request: 

  • Switching the WordPress theme 
  • Saving settings in the Customise area 
  • Activating a plugin 
  • Deactivating a plugin 
  • Autoptimize cache purge: When a cache clear is requested in Autoptimize, StackCache will also do a full clear.   

Events that purge a single page 

For changes that only affect a small section of the site, such as editing a single page or updating a current post, a full clear isn’t usually necessary. So StackCache will only run the clear on the URLs that have been changed rather than the whole site. 

The events that trigger this are listed below: 

  • Moving a post to the Trash folder 
  • Deleting a post or page from the site 
  • Restoring a deleted post 
  • Editing a post or page 
  • When a post or page comment is added or updated  
  • Updating a post

Note: Our StackCache system treats WooCommerce products as posts, and so any changes made to your products that match with the above will also fire off cache requests. 

Can I make StackCache purge more frequently? 

Sometimes, based on how often you update aspects of your site, you may want to always make sure that you’re displaying the latest version of your site. Rather than just running cache clears on individual parts of the site, you can enable options within StackCache itself to allow for a more aggressive cache clearing setup. To do this: 

  • Log into wp-admin on your WordPress site. 
  • Navigate to the StackCache section in the column on the left-hand side of the page. 
  • Here, you’ll see StackCache’s main settings. Two of these include:
    • Make Automatic Cache Purging Purge Everything: when we detect content changes, we purge the cache automatically for the post/page URL modified, the index page and your site’s RSS feed automatically. Enabling this option will trigger a full cache purge whenever these events are detected. 
    • Perform Automatic Cache Purging For All Post Types: by default, we only purge the cache automatically when standard post types are modified. Enabling this option will trigger a cache purge regardless of post type. 

With this knowledge, you can better manage and customise StackCache to work with your WordPress site. Provide the best possible experience for your visitors by serving fresh content when needed - without sacrificing site speeds.