Example #1
0
 /**
  * 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);
 }
 private function getAllSegments()
 {
     if (!$this->segmentListCache->contains('all')) {
         $segments = $this->segmentEditorModel->getAllSegmentsAndIgnoreVisibility();
         $this->segmentListCache->save('all', $segments);
     }
     return $this->segmentListCache->fetch('all');
 }