Viewing 4 replies - 1 through 4 (of 4 total)
  • Anonymous User 16850768

    (@anonymized-16850768)

    We don’t have a hook available at this time that checks if a cached page exists based off of the post ID, however, a custom function can be added to your site to do this. I’d be happy to help with this.

    To better understand what you’re wanting to do, would it be possible for you to share more about what you’re wanting to accomplish with this extended functionality? That will help me either find something that may already be available in the plugin or help create something for your use case instead.

    Thread Starter rahulroy79

    (@rahulroy79)

    Thanks for the revert Corey.

    I have a custom script which optimizes the output on the site using ob_start and ob_end_flush. The action is performed at priority 11, wp_loaded. I am not clear if the cache is served from the server before or after that, hence thought it would be a good backup to skip the buffering process by checking the existence of page cache.

    Regards
    Rahul

    Anonymous User 16850768

    (@anonymized-16850768)

    You’re welcome, Rahul. Currently Cache Enabler delivers cached pages when the advanced-cache.php drop-in is included, which occurs before the wp_loaded hook is fired. That means wp_loaded is never fired when a cached page is delivered.

    Thread Starter rahulroy79

    (@rahulroy79)

    Understood. Thanks for the guidance Corey.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to get the check if the cache for a Post ID exists?’ is closed to new replies.