save() публичный Метод

public save ( Psr\Cache\CacheItemInterface $item )
$item Psr\Cache\CacheItemInterface
Пример #1
0
 /**
  * @api
  * 
  * @param Point $point
  * @param bool $forse
  * @return Hourly
  */
 public function getHourly(Point $point, bool $forse = false) : Hourly
 {
     $item = $this->cache->getItem($this->getCacheKeyHourly($point));
     if ($forse || !$item->isHit()) {
         $item->set($this->doFetchHourly($point))->expiresAt($this->getCacheExpirationHourly())->setTags(['weather']);
         $this->cache->save($item);
     }
     return $item->get();
 }