Can we solve the rebuild cache problem automatically?
-
Hi, I have more than 10 sites created using this plugin and I haven’t been able to solve this problem for a long time and every day I have to check if everything is ok!
It doesn’t seem right anymore than a plugin so it seems like slavery
back in the posts I found a code that rebuilds the cache via cron job. this code doesn’t seem to work by blocking streaming but the idea was good and it might work
I paste the code below and I warmly thank whoever created it. let’s find a solution together??? thank you all!!!
Last chance, then we’ll officially change plugins for all my clients and goodbye to slavery!!!!
<?php register_activation_hook(__FILE__, 'custom_cache_clear_activate'); function custom_cache_clear_activate() { my_custom_cache_clear_event(); } function my_custom_cache_clear_event() { $task = 'flow_flow_load_cache_clear'; $frequency = 'hourly'; add_action($task, function () { global $wpdb; $wpdb->query($wpdb->prepare('DELETE FROM '.$wpdb->prefix.'ff_posts')); $wpdb->query($wpdb->prepare('DELETE FROM '.$wpdb->prefix.'ff_post_media')); }); if (!wp_next_scheduled($task)) { wp_schedule_event( strtotime(date('Y-m-d H:00:00', strtotime('now + 1 hour'))), $frequency, $task ); } } add_action('init', 'my_custom_cache_clear_event');
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can we solve the rebuild cache problem automatically?’ is closed to new replies.