• Resolved pettedemon

    (@pettedemon)


    Hi,
    it is possible to set a cron to purge all the site?
    For me is not good a cache system does not purge all site because there are more elements in page I need to purge every hour.
    thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Stoyan Georgiev

    (@stoyangeorgiev)

    Hey there @pettedemon,

    You can use the helper functions we have provided for that purpose.

    if you want to clear the cache you can use

    if (function_exists('sg_cachepress_purge_cache')) {
        sg_cachepress_purge_cache();
    }

    If you want to purge a specific url you can use this one

    if (function_exists('sg_cachepress_purge_cache')) {
        sg_cachepress_purge_cache('https://yoursite.com/pluginpage');
    }

    If you need to purge everything (Dynamic cache, Memcached & combined/minified assets) you can use this one
    sg_cachepress_purge_everything

    Kind Regards,
    Stoyan

    Thread Starter pettedemon

    (@pettedemon)

    Hi @stoyangeorgiev, but if I want to set a purge in cron?
    thanks

    Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    Hey @pettedemon

    If you want to set a purge in cron, just schedule a cron job and add any of the functions mentioned above as a callback.

    Regards,
    Stanimir

    Thread Starter pettedemon

    (@pettedemon)

    Hi @sstoqnov I thing there was an url I can set in server cronjob.
    thanks

    Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    No, the plugin doesn’t have such url. You have to set it manually.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Set purge cache in cron’ is closed to new replies.