protected function setMedia(MediaCollectionInterface $media)
    {
        $cache = $this->getMediaCache();
        $cacheKey = md5('media' . $this->getCacheKey());
        $cache->set($cacheKey, $media);

        $this->media = $media;

        return $this;
    }
protected function setMedia(MediaCollectionInterface $media)
    {
        $cache = $this->getMediaCache();
        $cacheKey = md5('media' . $this->getCacheKey());
        $cache->set($cacheKey, $media);

        $this->media = $media;

        return $this;
    }
protected function setMedia ( MediaCollectionInterface $ media ) { $ cache = $ this -> getMediaCache ( ) ; $ cacheKey = md5 ( 'media' . $ this -> getCacheKey ( ) ) ; $ cache -> set ( $ cacheKey , $ media ) ; $ this -> media = $ media ; return $ this ; }
Sets the associated media collection.

@param  MediaCollectionInterface  $media Representation of associated media.
@return $this
Sets the associated media collection .