Correct. Right now, we only clear client-side cache using a cron-job action triggered based upon scheduling events “open / close”.
Unfortunately, we currently don’t support a hook for this action. We understand the use case. Thank you for providing the recommendation for a feature request to define a hook for server side cache clearing development efforts. We’ve added this request to our roadmap for development, we’ll try and get it implemented in a future release, so you can develop a solution for server side cache clearing.
Hi,
thanks for follow up, really appreciate
m
-
This reply was modified 6 years, 1 month ago by
Marco1970.
Providing an update to this support forum post. In version 4.0+, we’ve added a cache hook to the plugin
Hook name: zhours_on_cache_clearing
Now you should be able to develop a solution for server side cache clearing related to the plugin.
Thanks!!!
but I tested, and it seems to be never called ;-(
here my action hook:
function my_zhours_on_cache_clearing()
{
wp_mail(‘….@…’, ‘zhours_on_cache_clearing’, ‘Hello!’);
}
add_action(‘zhours_on_cache_clearing’, ‘my_zhours_on_cache_clearing’);
but I never get any notification.
is you cache clearing a code running in JS (interval) or in backend PHP (cron)? if former, any way I can check the JS console if it is happening?
TY
M
A few comments. The cache function calls in PHP by cron.
You should check if the cron exists using (e.g. by WpCrontrol). add_action('zhours_on_cache_clearing', 'my_zhours_on_cache_clearing');
Plus make sure you are using the correct callback for the hook depending on if you are calling inside of the class or inside a simple php file.