Though it's not pretty, you may want to look into "componentizing" your pages using SSI. Since "virtual" includes via SSI can call CGI or whatever else you want, you can cache HTML "chunks" of an overall page while having other portions of the page dynamically-generated.