As part of the new CMS I'm planning, I'm going to cache the HTML output of some “static” content. I say “static” because the content stored in the database is not static, but it is close enough. The system will MDH hash the request URL and save the reduced version of the HTML output in the cache folder. The next time the page is requested, the CMS checks for the cached version, then checks the age of the file and then maintains the cached version, thereby saving a lot of resources (especially when it comes to database calls).
Obviously, getting nginx to serve static files without approaching PHP will be much faster. So, is there a way to get nginx to hash the request URL and check the temporary folder to see if it exists?
source share