Alrighty. We got drupal running a few weeks ago and it's running great. I decided to turn on caching and be nice to my host. My problem is that we have a random image php script sitting inside our phptemplate. This works really well when caching is turned off, but now the cache is stuck with a single image and won't rotate the image like it's supposed to.
Is there anyway to get drupal to "ignore" certain bits of code in the cache. The main audience of our site is anonymous users, the only users are staff who need to access and change content.
My only work around might be to set php to parse .css files for php commands then change the div so rather than having an img tag is uses background-image. The problem is that we wouldn't have the alt/title attributes and I really don't want php parsing another 2 or 3 files every time a page loads. The other problem: does drupal cache even the css files?
You'll notice that reloading any pages under 'Contact,' 'About,' or 'Events' the image to the right won't automatically change. http://vanfcog.org/
Thanks for the help!
Comments
cache lifetime?
How about changing the cache lifetime at admin/settings? Visitors could at least see a different image every 5 or 10 minutes.
---
Work: BioRAFT
Or, you can use some
Or, you can use some client-side code to change the image: javascript or flash.
----
http://PointHomes.com
Or you could even just have
Or you could even just have your page link to, say, "random.gif", and configure the server so that requests for that "random.gif" will map to an appropriate randomly-chosen file. I don't know how to actually do that, but it shouldn't be too difficult. (Not sure if browser caching might make this solution problematic, though...)