PHP Caching - Is it faster to save in database or create a file?

后端 未结 4 1007
情深已故
情深已故 2021-02-06 01:16

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

4条回答
  •  自闭症患者
    2021-02-06 01:37

    Both options utilise the file system, as (assuming you're using MySQL without MEMORY/HEAP tables) database records are still stored in files.

    If you have an active database connection at the time of requesting the cached data, I'd stick with the database.

提交回复
热议问题