• Resolved maryannk

    (@maryannkelley)


    I use InfiniteWP to manage all of my WP installs, and I have a code snippet that I run on all sites to purge the cache after updating plugins. What function should I can add to the code snippet that will purge AO cache when I run the code snippet on all sites from the IWP panel?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    autoptimizeCache::clearall() should do the trick ??

    hope this helps,
    frank

    Thread Starter maryannk

    (@maryannkelley)

    autoptimizeCache::clearall() should do the trick ??

    Thanks, Frank!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome Mary-Ann, feel free to leave a review of the plugin and support here! ??

    Thread Starter maryannk

    (@maryannkelley)

    Hi Frank – I tried this code and it’s not working:

    if (function_exists('autoptimizeCache')) {
     autoptimizeCache::clearall();
     echo 'Autoptomize: JS and CSS cache cleared';
    
    } 

    It’s not throwing any errors, but it’s not clearing the cache. I tried it both with and without ::clearall() in the check to see if the function exists.

    • This reply was modified 5 years, 7 months ago by maryannk.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    autoptimizeCache is a class, not a function, so you’ll have to do something like

    
    if (class_exists('autoptimizeCache')) {
     autoptimizeCache::clearall();
     echo 'Autoptomize: JS and CSS cache cleared';
    } 
    Thread Starter maryannk

    (@maryannkelley)

    Works perfectly, thank you! Off to review the plugin and support. ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Function to Manually Purge Cache from InfiniteWP?’ is closed to new replies.