• Resolved mellow1

    (@cdsigns)


    Hi,

    We love this plugin and have been very happy users. Thank you so much.

    4 months ago Stanimir helped us to use the sg_cachepress_purge_cache in our webshop. We have a setting store-owners can adjust for their store. The functions we have is so any changes made are saved, and with our function in child-theme functions.php the cache is purged. So if the functions is triggered, we also purge the cache of your plugin.

    Recently we discovered the purge unfortunately is no longer working. If we manually purge cache from backend of the website it works. But the function does not work.

    The code we used is this:

    `// add class on checkbox
    function my_body_classes( $classes ) {
    if( wfs_is_service_enabled() ) {
    $classes[] = ‘StoreIsNOTServing’;
    }
    if (function_exists(‘sg_cachepress_purge_everything’)) {
    sg_cachepress_purge_everything();
    }
    return $classes;

    }
    add_filter( ‘body_class’,’my_body_classes’ );`

    We have SiteGround Optimizer 6.0.3. Please let us know if you need any more information or access.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Doing this is worse than disabling the cache. It purges the cache on every request. The function is intended to be called on certain events not on every hit. Just disable your caching, it will be better for your site performance than doing this. The function itself remains unchanged and purges the cache the same way it used to. Probably, something else is preventing it from working. However, as I said, it would be better to just disable the caching…

    Thread Starter mellow1

    (@cdsigns)

    Hi @hristo-sg ,

    Thank you for the amazingly fast reply. We will give that a try.

    How do we disable the cache for this website? Is that by removing the plugin SiteGround Optimizer or do we need to change the settings in the “Cache” tab of the SGO plugin?

    Plugin Author Elena Chavdarova

    (@elenachavdarova)

    Hello @cdsigns,

    Cache can be disabled from SiteGround Optimizer -> Caching -> Dynamic cache -> Off.

    If you delete the plugin the website will use the global SiteGround Dynamic cache which is enabled by default.

    Best Regards,
    Elena

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘sg_cachepress_purge_cache not working’ is closed to new replies.