src/Cache.php
public function add($cacheId, Cacheable $cacheable)
    {
        $this->cachedItems[$cacheId] = (object) [
            'cacheable' => $cacheable,
            'expiry' => $this->timeUtil->expiry($cacheable->ttl())
        ];
        return $this;
    }
public function add($cacheId, Cacheable $cacheable)
    {
        $this->cachedItems[$cacheId] = (object) [
            'cacheable' => $cacheable,
            'expiry' => $this->timeUtil->expiry($cacheable->ttl())
        ];
        return $this;
    }
public function add ( $ cacheId , Cacheable $ cacheable ) { $ this -> cachedItems [ $ cacheId ] = ( object ) [ 'cacheable' => $ cacheable , 'expiry' => $ this -> timeUtil -> expiry ( $ cacheable -> ttl ( ) ) ] ; return $ this ; }
add cacheable item and associate it with cache identifier

@param string    $cacheId  cached item identifier
@param Cacheable $cacheable item to cached
@return CacheInterface current instance
add cacheable item and associate it with cache identifier