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;