How to Cache RAND() random images in PHP MYSQL
use to be cache for 5 seconds then on refresh its change images reply
How to Cache RAND() random images in PHP MYSQL
use to be cache for 5 seconds then on refresh its change images reply
Put the images in a persistent storage (MySQL, memcache, xcache...) along with the time when they were put into storage.
When you read them, determine if the persistent storage is older than the cache limit (in this example, 5 seconds) and if it is, rebuild it before reading the images.