每次有人登陆我的页面list.php?id=xxxxx
时,它都会请求一些 MySQL 查询来返回:
$ids = array(..,..,..); // not big array - not longer then 50 number records
$thumbs = array(..,..,..); // not big array - not longer then 50 text records
$artdesc = "some text not very long"; // text field
因为我从中进行查询的数据库非常大,所以我想将此结果缓存 24 小时,可能是一个文件,例如:xxxxx.php
在 /cache/ 目录中,这样我可以在include("xxxxx.php")
它存在时使用它。(或txt文件!?,或任何其他方式)
因为有非常简单的数据,我相信只需要几行PHP就可以完成,不需要使用memcached或其他专业对象。
因为我的 PHP 非常有限,有人可以为这个任务放置 PHP 主线(或代码)吗?
我真的会非常感激!