Support » Plugin: Cache Enabler - WordPress Cache » Whole cache purged when updating page

  • Resolved lozula


    When I edit a page (not a post), the whole cache purges when I press the update button.

    This happens even if:

    Clear cache is set to page specific on the page editor.
    None of the checkboxes are enabled for cache behaviour.

    I am using the Classic Editor plugin, not Gutenberg.

    Please advise. Expected behaviour is just for the page cache to delete.

Viewing 7 replies - 1 through 7 (of 7 total)
  • I’ve been unable to replicate this issue on version 1.3.4. The page “Clear cache” setting is set to “Page specific” and none of the Cache Behavior settings are enabled. When updating a page, whether it’s the title or content, only the edited page cache is cleared (as expected).

    Are there different steps that I need to take to replicate this issue? If not, do you have another plugin or custom function that is clearing the entire cache?

    I use autoptimize, but I don’t believe it clears the cache unless I specifically tell it to. The only other caching is done by my host (Flywheel), so I guess they could somehow be triggering the cache clear when I update a page? Is that possible? It’s just weird that it doesn’t trigger it when I update a post.

    None of my other plugins are related to caching or would have any way to clear the cache that I can see (I run a pretty small number of plugins on the site)

    • This reply was modified 5 months, 2 weeks ago by  lozula.

    As far as I know, Autoptimize doesn’t clear the cache automatically. However, the Cache Enabler cache will be completely cleared if Autoptimize cache is cleared (in order to generated and cache pages with the newly created Autoptimize files). To troubleshoot this further, if you update a page do the Autoptimize files remain unchanged?

    You are absolutely correct, updating a page is for some reason causing the Autoptimize cache to be purged. I had never noticed this before.

    @optimizingmatters – any thoughts as to why this might be happening?

    It’s most likely related to your theme or a plugin. To find the exact cause I would first recommend searching your code base for autoptimizeCache::clearall().

    Hi @coreyk

    I did search for that string, as well as just “autoptimize” in general, following a discussion with Frank of Autooptimize. None of the code in my theme files or other plugins calls AO, it’s only found in the AO plugin itself.

    In addition, when I disable cache enabler, AO no longer clears the cache when I update a page. I installed a different caching plugin, which also doesn’t cause the cache to clear when I update a page. So I can’t see how it can be anything other than something in Cache Enabler causing this to happen, but I have no idea how to troubleshoot and figure out what that would be

    I’ve attempted to replicate the issue again, however, on a fresh install of WordPress with both the Cache Enabler plugin and Autoptimize plugin I’ve been unable to. Editing a page (or post) doesn’t trigger the Autoptimize cache to clear (which would then completely clear the Cache Enabler cache).

    We can debug this further if you’re interested and if you have a development environment to do so. To start, you can add define( 'WP_DEBUG', true ); in your wp-config.php file to see if any errors are occurring. If there are no errors occurring you can add add_action( 'all', create_function( '', 'var_dump( current_filter() );' ) ); to your functions.php file. However, keep in mind that this will display all of the hooks and filters executed on a page.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.