public function getMenu($type) { if ($this->environment == 'prod') { if ($this->appCache->contains('menu_' . $type)) { return unserialize($this->appCache->fetch('menu_' . $type)); } } return $this->load($type); }
/** * Gets cache by cacheID * * @param mixed (integer|string) $cacheID * @return mixed (Weather|boolean false) */ private function getCache($cacheID) { if ($this->appCache->contains($cacheID)) { return unserialize($this->appCache->fetch($cacheID)); } else { return false; } }