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
Hi @stoyangeorgiev, but if I want to set a purge in cron?
thanks
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
Hi @sstoqnov I thing there was an url I can set in server cronjob.
thanks
No, the plugin doesn’t have such url. You have to set it manually.