• Resolved km

    (@kmaisch)


    In my header.php, I am including a PHP page that displays the current time and weather. The code is:
    <?php include(‘template-parts/weather-widget’); ?>

    I am wanting to ensure this included content is not cached.

    I have tried changing it to the following:
    <esi:include src=”wp-content/themes/makeit/template-parts/weather-widget.php” cache-control=”no-cache” />

    However, the included file just doesn’t appear. Any ideas?
    Cheers,
    Kim

Viewing 1 replies (of 1 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    You will need to add ESI=on rewrite rule as this example

    But it is better practice that you use our API

    Best regards,

Viewing 1 replies (of 1 total)
  • The topic ‘Prevent caching an included page’ is closed to new replies.