PHP Caching - Is it faster to save in database or create a file?
问题 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 unexpired cached version of the page to serve up, and only regenerates the page if it can't find one. This works well - but would it put less load on the server to save the cached pages as files instead saving to the database? I could use a naming convention in the files to handle the expiry time. If it is faster and less