/** * อ่านข้อมูลจากแคช * * @param Item $item * @return mixed คืนค่าข้อมูลหรือ false ถ้าไม่มีแคช */ public function get(Item $item) { return $item->isHit() ? $item->get() : false; }
/** * อ่านข้อมูลจากแคช * * @param string $key * @param array $values (options) * @return mixed คืนค่าข้อมูลหรือ false ถ้าไม่มีแคช */ public function get($sql, $values) { $this->item = $this->db_cache->getItem(Text::replace($sql, $values)); return $this->item->isHit() ? $this->item->get() : false; }