|
To cache it, simply save the image to a temporary location, and each time the script runs, have it check to see if the saved image is less than 1 hour old. If it is, the script can simply display the saved file rather than generate a new one. Otherwise, if the file doesn't exist, or is older than 1 hour, it can delete the old cache file and create a new one.
|