I'm in the middle of moving away from PyroCMS to a custom solution built on Laravel. Wont go into the details as to why here, but it is a necessity.
I'm toying with the idea of caching things like pages and posts into flatfile once they are created, and then loading them (if they exist) and falling back to the mysql database if the cache isnt found.
It got me thinking. Is there a problem with essentially running the entire 'frontend' of your system or site on flatfile, pre-rendered cached files? Surely the cache only needs dropping/replacing when a post or page is modified, so a cache could essentially be kept for the lifetime of the site.
Unless I'm missing something, surely this is something that should be done a lot more, should it not? Even if it was just storing serialised or json data from the database tables, it's got to be faster than opening up a mysql connection hasn't it?