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
There is not one real answer to your question, it really depends on the number of queries and the cache the database uses in contrast to the time it takes to parse a file. A lot of other factors may take place as well.
However you can use PHP extensions such as Memcached as Denis suggested. This works even better in combination with a database by using a framework like Doctrine. This makes it easy to manage your data using the database. And serve the actual data in production by caching query results.