I developed a PHP page with global variable like this;
global $amty_imgCache; $amty_imgCache = array(); $GLOBALS[\"amty_imgCache\"]=$amty_imgCache; >
global $amty_imgCache; $amty_imgCache = array(); $GLOBALS[\"amty_imgCache\"]=$amty_imgCache;
Use APC or memcache to store such values. You can not only access these values from any page but can also access from any server.