Stop Caching
Posted: Mon Mar 13, 2006 10:07 pm
Hi
I am using CMSMS 0.12 and am having a problem with the caching. The caching is working perfectly. However, I have included some php code on several pages which should spit up different content on each loading of the page - random images, random quotes, user specific content, etc. Since the coding of the page remains unchanged, even though the actual content should change, the Smarty caching system barfs up the page that it cached the first time the page was accessed.
For example, I have used in the template
{php}include("random_image.php:); {/php}
The image randomly genrated on the first loading of the page is the one seen thereafter unless I manually change the template in some manner.
Thus my question: is there a way to shut off the Smarty caching for specific pages, or, as a last resort, shut it off entirely.
I have not been able to find anything in these forums on the subject. Everything I have tried to alter the content of the page, other than manually changing the template, has not worked as the Smarty system checks 'content' before compiling the page rather than after. Excellent system for speed; a problem for variable content.
I am using CMSMS 0.12 and am having a problem with the caching. The caching is working perfectly. However, I have included some php code on several pages which should spit up different content on each loading of the page - random images, random quotes, user specific content, etc. Since the coding of the page remains unchanged, even though the actual content should change, the Smarty caching system barfs up the page that it cached the first time the page was accessed.
For example, I have used in the template
{php}include("random_image.php:); {/php}
The image randomly genrated on the first loading of the page is the one seen thereafter unless I manually change the template in some manner.
Thus my question: is there a way to shut off the Smarty caching for specific pages, or, as a last resort, shut it off entirely.
I have not been able to find anything in these forums on the subject. Everything I have tried to alter the content of the page, other than manually changing the template, has not worked as the Smarty system checks 'content' before compiling the page rather than after. Excellent system for speed; a problem for variable content.