(This has to do with a failing @fopen on a missed cache event, see also the topics http://modxcms.com/forums/index.php/topic,4340.0.html and http://modxcms.com/forums/index.php/topic,4306.0.html)
I guess you could create your array within the documentObject, say
$modx->documentObject[’myarray’] = array(’A’ => 1, ’B’ => 2);
Since the documentObject gets cached and rebuild from cache your data would be restored, too. Not tested at all. ;-)
See document.parser.class.inc.php for details.
if (!isset($modx->documentObject["albumcache_".$directory])) {
// This include fills $pic_list by using SOAP
include APP_ROOT."include/getRemoteAlbum.php";
$modx->documentObject["albumcache_".$directory]=$pic_list;
} else {
$pic_list=$modx->documentObject["albumcache_".$directory];
}
// This include file show webalbum by using the contents of $pic_list
include_once APP_ROOT."webAlbum.php";
return $return_value;