예제 #1
0
파일: Cache.php 프로젝트: liftkit/database
 public function getCachedResult(DatabaseQuery $query)
 {
     $result = $this->cachedQueries[$query->getRaw()]['result'];
     if ($query->getType() == DatabaseQuery::QUERY_TYPE_SELECT && $query->isCached() && $result) {
         $result->rewind();
         return $result;
     } else {
         return null;
     }
 }