Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • twinstate
    Participant

    We use WP Rocket and when we post an announcement, it doesn’t show until we clear WP Rocket’s cache. Is there a method or hook we could use to clear the cache when an announcement is activated or disabled?

    Hi there,

    I haven’t used WP Rocket. But every caching plugin must have some kind of hook to clear the cache.

    There are various caching plugins out there. So it wouldn’t be possible to automatically clear the cache for one specific plugin.

    Since announcements are just like posts, may be you can check with WP rocket team to see if it is possible to clear cache when posts of type “announcer” is published.

    If you can find the hook to clear the cache, then you can use it with WordPress’s on publish post hook and call the wp rocket function to clear the cache.

    {$new_status}_{$post->post_type}

    Also, since announcements are something which are not often changed, I think it would be better to manually clear the cache in WP rocket.

    Hope this helps.

    Thanks,
    Aakash

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Subscribe for updates

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter