/** * Get the value of a key. * * This method returns null if the key was not found. * * @param string $key * @return mixed */ public function get($key) { $filename = $this->_getFilename($key); $data = Storage::readPHPData($filename); if ($data === false) { return null; } elseif (!is_array($data) || count($data) < 2 || $data[0] > 0 && $data[0] < time()) { Storage::delete($filename); return null; } else { return $data[1]; } }