I'm using ammap to display a map. On click, the user gets a list of latest Drupal 6 nodes tagged with the respective country (taxonomy). The list is generated by a view. To accomplish that, I use the basic ammap XML code, but I added some PHP to include the view, i.e.:
<?php
//set the working directory
chdir('..');
define('DRUPAL_ROOT', getcwd());
//Load Drupal
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
header ("Content-Type:text/xml");
?>
<map map_file="maps/world3.swf" tl_long="-117.2" tl_lat="33.3" br_long="-94.5" br_lat="-33.9" zoom="299.9999%" zoom_x="-30.94%" zoom_y="-156.8%">
<areas>
<!-- ... -->
<area title="ARGENTINE" mc_name="AR">
<description><![CDATA[<?php print views_embed_view('MY_VIEW', 'VIEW_DISPLAY_ID', 'ARGUMENT'); ?>]]></description>
</area>
<!-- ... -->
</areas>
</map>
Now, since there are many tags that include a view, generating the XML file takes some moments which leads to long loading times for the map. For that reason I would like to cache the generated XML file somehow - taking into account that I need to add a path to it in the ammap configuration file.
How could I do that?