• Resolved LELB Society

    (@lelb)


    Hi.
    Thanks for your wonderful caching and optimization plugin.
    I have just one issue with this plugin. I frequently need to modify css files in Customizer, activate/deactivate plugins, or modify widgets, and after any subtle change to my site, the ENTIRE cache is deleted automatically.
    Is there a way to manually (NOT automatically) delete ENTIRE cached files, as they are really valuable for my business upon insignificant changes to my site?
    Looking forward to your reply…
    Thanks in advance!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Harshad

    (@bornforphp)

    @lelb Please add the following code to your active theme’s functions.php file

    add_filter('wpo_purge_all_cache_on_update', '__return_false');

    Thread Starter LELB Society

    (@lelb)

    I did as instructed, but upon modifying one single line of css code in Additional CSS (Customizer), my entire cache was deleted automatically. The above-mentioned code did not work.

    Hi @lelb,

    Do you also have WP-Optimize’s minify feature enabled?

    Best,
    Marc

    Thread Starter LELB Society

    (@lelb)

    Hi @marcusig,
    Yes, I do. I’ve enabled minification for JS, CSS and Fonts. Yet, if minification is the source of this issue, I could use Autoptimize just for the sake of minification.
    Please kindly guide me if I should disable WP-Optimize minification to prevent the entire cache purge upon any insignificant update.
    Thank you so much indeed.

    Saving the customizer will purge the minify files, which in turns will purge the page cache. So you can try deactivating Minify to see if that works, in addition to the previous filter.

    Thread Starter LELB Society

    (@lelb)

    I put it to test. I disabled Minify feature, and modified Customizer with the filtering code given by you. However, the entire cache is purged. The same issue happened when I activated / deactivated a plugin.
    I think this is the default mechanism of your plugin and the majority of the users prefer this feature, and I quite understand it. I need to keep everything intact to prevent any cache purge.
    I appreciate all your efforts and attention.

    Harshad

    (@bornforphp)

    @lelb That should not usually happen if the filtering code is added, do you have any other cache plugin installed?

    Thread Starter LELB Society

    (@lelb)

    I’m using Radis Object Cache just for object caching at server level on digital-ocean.
    I don’t have this issue with other plugins like cache enabler with Redis object cache.

    Harshad

    (@bornforphp)

    @lelb Is it possible for you to temporary disable the Redis cache and then try to update the post/page or make changes to CSS file and see if the cache is purged?

    Thread Starter LELB Society

    (@lelb)

    I had done that before, but at that time, keeping the cached files was not that important to me.
    Running a membership site with over 100 paid members, I need to take care of caching for both static and dynamic content, and as far as I know, WP-Optimize does not cache dynamic content, that’s why I’m using Redis Object cache.
    Actually I’ve purged my cached files twice for this test during the last 3 days, and lost nearly 2 GB of static files. I’ll continue using WP-Optimize as it’s offered my site the best performance metrics compared to other plugins.
    I will try your recommended solution next time when I really have to tweak the css files or modify my plugins (only 5 plugins).
    Thanks for your attention.

    Harshad

    (@bornforphp)

    Thanks for your support! If you have any more questions, please feel free to write back to us.

    Have a nice day!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Prevent Automatic Purging of Entire Cache’ is closed to new replies.