Bypass php code

I have some php scripts on my site that generate dynamic content in Wordpress. I originally had them as functions. When enabling apo they all started showing the same content on refresh, so it was hitting the cache.

I tried putting the function code into a separate PHP file and doing an include and referencing it in wordpress while doing a bypass on the url/file.php in the page rules, but that doesn’t seem to help.

Is there an easier way to do this or am i going about it the wrong way?

Thanks

Hi there,

Have you considered setting the cache headers on the dynamic content not to be cached (max-age=0 or no-cache) or to have a low max-age like 5 minutes for instance (max-age=300)?

Take care.

1 Like