• Resolved Marco1970

    (@marco1970)


    Hi,

    do you have an action hook which I can use to implement my own additional cache cleaning when you do yours at every open / close switch?

    you state that you only clean client-side cache, so it would be extremely useful if you give us a hook when we can do some more. I really do not want to re-implement all the logic to understand when a open / close switch is happening..

    LMK and TY

    m

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

    (@bizswoop)

    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.

    Thread Starter Marco1970

    (@marco1970)

    Hi,

    thanks for follow up, really appreciate

    m

    • This reply was modified 4 years, 8 months ago by Marco1970.
    Plugin Author bizswoop

    (@bizswoop)

    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.

    Thread Starter Marco1970

    (@marco1970)

    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

    Plugin Author bizswoop

    (@bizswoop)

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cache clean up action hook’ is closed to new replies.