• Resolved drgonzo77

    (@drgonzo77)


    Hi,

    is there any chance to exclude a certain file from being cached? We have a shortcode in our functions.php that outputs opening hours based on the servertime on our website’s footer. With caching activated the output makes no sense. By clearing cache it’s correct, but just for the moment after clearing.

    Any help is much appreciated.

    Kind regards
    Gonzo

    • This topic was modified 3 years, 3 months ago by drgonzo77.
Viewing 4 replies - 1 through 4 (of 4 total)
  • @drgonzo77 Sorry at the moment you cannot add files to exclude, but you can add the url where the code is being executed on the page you can add the page to Exclude list from WP-optimize > Cache > Advanced Settings.

    Thread Starter drgonzo77

    (@drgonzo77)

    Thanks for responding.
    Yes, I’m aware of excluding certain URLs. But since it’s the website’s footer I would have to exclude every single page of the website.
    We have the footer as a global template-part and I excluded that from being cached, but since it is being inserted into every page that’s being cached, caching would not make any sense at all then ??

    @drgonzo77 Okay but you cannot add files to exclude from caching.

    Thread Starter drgonzo77

    (@drgonzo77)

    @bornforphp Yeah, that’s what I thought… I solved this by using ajax that runs the php once each minute ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Exclude a file from being cached’ is closed to new replies.