/** * @param string $file * * @return array */ protected function getEntriesFromCache($file) { $identifier = $this->getCacheIdentifier($file); return $this->cache->rememberForever($identifier, function () use($file) { return $this->getEntriesFromCsv($file); }); }
/** * Get an item from the cache, or store the default value forever. * * @param string $key * @param \Closure $callback * @return mixed */ public function rememberForever($key, Closure $callback) { if (is_array($key)) { return $this->rememberManyForever($key, $callback); } return parent::rememberForever($key, $callback); }