We run Cacti in a VM at work, and I got tired of waiting for it to render all of the graphs for the preview page (we have several hundred graphs, and right now load 60+ on one page). Thus the itch that needed scratching to produce a plug-in to act as a server-side cache.
I've whacked a copy up at
http://www.cricalix.net/~dhill/cacti/gr ... 0.1.tar.gz - you have to hack lib/rrd.php to use it unfortunately:
Around line 1168, where the rrdtool_execute call is made with $output_flag, duplicate the call. Change that flag to RRDTOOL_OUTPUT_STDOUT:
Code:
$savefile = rrdtool_execute("graph $graph_opts$graph_defs$txt_graph_items", false, RRDTOOL_OUTPUT_STDOUT, $rrd_struc);
Then change the hook call to reference savefile instead:
Code:
do_hook_function("rrdtool_function_graph_set_file", array('output' => $savefile, ...
Add it in like any other plug-in to config.php and you'll get an on-disk (which could point to a ramdrive) cache for each graph which gets picked up by the rrdtool_function_graph_cache_check hook.
This code is not written for Win32, as the on-disk location is /tmp. Nothing stops you hacking that though

Cache is set for 280 seconds, and self-cleans when the requested file is older than that (and hands off to the main routine for generation).