model = $model; $this->transientCache = $transientCache; } /** * Returns all stored segments that haven't been deleted. * * @return array */ public function getAllSegmentsAndIgnoreVisibility() { $cacheKey = 'SegmentEditor.getAllSegmentsAndIgnoreVisibility'; if (!$this->transientCache->contains($cacheKey)) { $result = $this->model->getAllSegmentsAndIgnoreVisibility(); $this->transientCache->save($cacheKey, $result); } return $this->transientCache->fetch($cacheKey); } }