I am currently caching dynamically generated PHP pages by saving them to a database with an expiry time field. If the page is requested again, the program checks for a unexpire
Here's something interesting that I have never tried but have heard good things about. You can use Google Spreadsheet API to act as a database through http requests. It sounds (in theory at least) like it is an ideal resolution to a problem like this. Not an answer to your question just another option.