• Resolved peterkueger

    (@peterkueger)


    How can I find out, if the current generated WordPress post will be cached?

    (I want to add some information for authors, if they are logged in inside a shortcode. But this information should not shown for anonymous readers.)

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @peterkueger

    Thank you for your inquiry.
    The page is cached once visited if you are not using Cache Preload. There is an option in Performance>Page Cache “Don’t cache pages for logged in users”, or Don’t cache pages for following user roles and select Author, enable that option and purge all cache to ensure that the page is not cached when viewed by logged in user.
    I hope this helps!
    Thank you!

    Thread Starter peterkueger

    (@peterkueger)

    Hi @vmarko,

    oh, sorry, I wrote bad.

    I’m looking for a PHP code. That should show me, if the current generated page will be cached.

    Thank you!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @peterkueger

    Thank you for the clarification. Unfortunately no there is no such a PHP code that can tell you if the current generated page will be cached.
    As this is the first time someone is asking for something like this, I’ll present this to the team and see if we can do something bout this in the future.
    Thank you!

    Thread Starter peterkueger

    (@peterkueger)

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to detect, if a page will be cached?’ is closed to new replies.