Sulu\Component\Cache\CacheInterface::read PHP Method

read() public method

Read content of cache.
public read ( ) : Serializable
return Serializable
    public function read();

Usage Example

Example #1
0
 /**
  * Returns system collections.
  *
  * @return array
  */
 private function getSystemCollections()
 {
     if (!$this->systemCollections) {
         if (!$this->cache->isFresh()) {
             $systemCollections = $this->buildSystemCollections($this->locale, $this->getUserId());
             $this->cache->write($systemCollections);
         }
         $this->systemCollections = $this->cache->read();
     }
     return $this->systemCollections;
 }
All Usage Examples Of Sulu\Component\Cache\CacheInterface::read