I have a front page that calls some content with a function located in template.php, returning some random images.

The page gets cached and only logged in users see dynamic content.

The page is accessible to www.mysite.com and www.mysite.com/front_page, both of which are cached separately I discovered.

How can I prevent those paths from being cached so that my function returns a different image each time the page is viewed?

Comments

ajundra’s picture

You can define cache exclusions with the CacheExclude module.

jmlavarenne’s picture

Thanks for the tip.