mutliple dynamic images from same data in one view?

I've got a query that collects a bunch of statistics from the database and I want to display several graphs generated from that same data on one page. (I'm using Gruff for the graphs.) I've only come up with two basic ways to handle this:

1) Do the queries and the graph generation all in one controller action, save the graphs to files and use plain old IMG tags to get them all on the page. I'd rather not do this because I don't want a mess of temp files to deal with.

Why would it be a mess? As long as there is something to key the graph report on (date range, id, username, etc.) you should be able to write all the files into a single directory which would make it easy to cleanup the next time that graph was called with those parameters... or if it was called soon enough (and depending on your business logic) just use the same files again...

This way also has the advantage that if the reports took awhile to generate you could easily tweak it so users submit requests, get a "thanks we're working on it" and then have a background process do it, and email when they are ready or some such...

-philip