Cache an Image
Posted: Sun Jun 11, 2006 8:47 am
Hi folks,
just something easy, I think.
I have a Script, which retreives some Infos from 3rd party websites, and then generates an Image
out of the data.
Now, it can take some sec. before the Image is created and displayed on the screen.
What I would like to do is cache the Images for like one hour.
Everytime I use the script, it should check if there is a cache version available, check if this is still valid, and display it.
If it isn't vailid anymore, then he should do like always, grab info from Webpage, save it as cache and display it.
How would it be the easiest way to get this working ?
Thanks in advance.
just something easy, I think.
I have a Script, which retreives some Infos from 3rd party websites, and then generates an Image
out of the data.
Now, it can take some sec. before the Image is created and displayed on the screen.
What I would like to do is cache the Images for like one hour.
Everytime I use the script, it should check if there is a cache version available, check if this is still valid, and display it.
If it isn't vailid anymore, then he should do like always, grab info from Webpage, save it as cache and display it.
How would it be the easiest way to get this working ?
Thanks in advance.