public function test($id) { $data = $this->getDb()->fetchRow("SELECT mtime,expire FROM cache WHERE id = ?", $id); if ($data && isset($data["expire"]) && time() < $data["expire"]) { return $data["mtime"]; } return false; }