• Resolved hosanaks

    (@hosanaks)


    hi all,

    I am using Pods + PHP code snippet inserter as shortcode + shortcode in elementor. I am displaying different pods every day depending on the day (dynamic selection based on date in the pods).

    Because of certain caching (in my hosting server or cloudflare, I presume), I need to add no cache code in my PODS php query, like below.

    header(“Cache-Control: no-store, no-cache, must-revalidate, max-age=0”);
    header(“Cache-Control: post-check=0, pre-check=0”, false);
    header(“Pragma: no-cache”);

    It solve the problem, but wondering whether it will impact other part of the page as well, or only the PODS part (the one contained in the snippet / shortcode).

    Any insight will be much appreciated.

    Many thanks
    Hosana

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @hosanaks

    That fully depends on how/where you use this code.
    It’s important that this code only gets executed when needed.

    Cheers, Jory

    Thread Starter hosanaks

    (@hosanaks)

    hi @keraweb, thanks for your kind reply.

    I execute this code only inside the code snippets plugin that also contains my php logic to query the pods.

    That code snippets plugin produce a shortcode, which I use in elementor page builder.

    My hope is that the no-cache only impacting pods and contained inside the shortcode only, and not impacting other part of the page. Do you have experience on this?

    I understand if this question maybe not really pods related, but more general.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP no cache impact to other part of the page’ is closed to new replies.