摘要:
class Post extends AppModel { public function newest() { $result = Cache::read('newest_posts', 'longterm'); //去拿缓存数据 if (!$result) { //如果缓存没有数据,就从数据库中去那数据 $result = $this->find('all', array('order' => 'Post.updated DESC', 'limit' => 10)); //获取 阅读全文
posted @ 2013-02-28 14:49
linksgo2011
阅读(201)
评论(0)
推荐(0)