Page 1 of 1

Image Cache

Posted: Fri Dec 09, 2005 4:02 pm
by scts102
I am using GD to place text on an existing image. This works fine.

However, each time the image is called, a server is queried...Now, this image may appear on many pages, so I would only want the image to update every 5 or 10 minutes. How can I implement a cache?

I read something about headers and expiring, but I am inexperienced with web development. Could someone write a quick example of how to cache the image, and refresh it every X minutes?

Thanks,

Posted: Fri Dec 09, 2005 4:04 pm
by hawleyjr
Why not just save the images to a temp folder and then run a cron job to delete the images after x amount of time.

Posted: Fri Dec 09, 2005 4:48 pm
by scts102
Okay...that sounds doable

How do I save the dynamic image to a file?

Posted: Fri Dec 09, 2005 4:51 pm
by hawleyjr