• Hello.
    I noticed that when I update a category, whole cache is automatically cleared. Is it possible to disable it? Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @fkoomek

    Thank you for reaching out!

    In Performance>Page Cache>Purge Policy you can select when the cahe will be purged.
    You can disable those settings and purge the cache manually per page when the content is updated.

    Thanks!

    Thread Starter fkoomek

    (@fkoomek)

    Hello.

    It’s not the case. The cache is cleared everytime no matter what I set in the purge policy. Just everytime I update the category.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @fkoomek

    Thank you for reaching out and I am happy to assist you with this.

    In some cases, some plugins or themes may use the W3 Total Cache filter to purge the cache once something is updated. W3 Total Cache does not purge the cache on its own unless specified in the Purge policy, which you mentioned is disabled.

    This means that something is calling w3tc_flush_all(), and you can check this in the purge log which can be activated in Performance>General settings>Debug>Purge Logs:

    I hope this helps!

    Thanks!

    Thread Starter fkoomek

    (@fkoomek)

    Are you sure about that?
    I disabled all plugins except for W3 Total Cache and also tried to change the theme to Twenty Twenty-Two, Twenty Twenty-Four, Generate Press and it’s still doing the same thing.
    Once I update any category, the whole cache is purged. It’s doing the same thing also on my other web.

    Radan

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @fkoomek

    Thank you for yoru feedback.

    If the Purge Policy is configured in the way as in the screenshot below, then the W3 Total Cache will not purge the cache if any chanegs are made.

    Have you checked the Purge log and have you seen what is calling the cache purge?

    Thanks!

    Thread Starter fkoomek

    (@fkoomek)

    Hi.

    Yes, the Policy is set exactly this way. I just created fresh new WP install and it is still doing the same thing. Once I update category, the whole cache is cleared. Please check the video.

    The Purge log is available only in Premium.

    Radan

    https://total.definus.cz/wp-content/uploads/2024/03/total_cache.mp4

    • This reply was modified 8 months, 1 week ago by fkoomek.
    Thread Starter fkoomek

    (@fkoomek)

    Hello Marko Vasiljevic.
    Any news here? Were you able to reproduce the issue on your end?
    Thank you.

    Radan

    Hello everyone,
    just want to report that I have same issue, whenever category or tag is updated, all page cache is purged.

    Thread Starter fkoomek

    (@fkoomek)

    Hi.
    I don’t know if it’s useful for you but as a workaround I use the following code. It completely disables the W3 total cache when editing/updating category/tag. I use it as a Must Use plugin but I think it could also work in functions.php. But I haven’t tested it yet.

    <?php
    
    add_filter('option_active_plugins', function ($plugins) {
        $url = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
    
        if (strpos($url, 'edit-tags') !== false) {
            unset($plugins[array_search("w3-total-cache/w3-total-cache.php", $plugins)]);
        }
    
        return $plugins;
    });
    

    Hi @fkoomek,
    thank you for the workaround solution, I tried with custom-plugin and/or with adding to function.php, but still something triggers purging all caches.
    I cannot figure out, what is the trigger…
    Tried with clear WP installation and only W3 Total Cache plugin problem still exists.

    Thread Starter fkoomek

    (@fkoomek)

    I think it only works used as a Must Use plugin. Did you try it?
    in “wp-content” folder create folder named “mu-plugins” and then to that folder insert php file with the code I provided. You can name the php file like you want, for example “disable_plugin.php”. So, the full path to the file will be “wp-content/mu-plugins/disable_plugin.php”

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Clear cache when updating category’ is closed to new replies.