protected function setCache(DataAbstract $data)
    {
        if (!$this->isCacheEnabled) {
            return $this;
        }

        $this->cache->set($data->getCacheKey(), $data);

        return $this;
    }
protected function setCache(DataAbstract $data)
    {
        if (!$this->isCacheEnabled) {
            return $this;
        }

        $this->cache->set($data->getCacheKey(), $data);

        return $this;
    }
protected function setCache ( DataAbstract $ data ) { if ( ! $ this -> isCacheEnabled ) { return $ this ; } $ this -> cache -> set ( $ data -> getCacheKey ( ) , $ data ) ; return $ this ; }
Set data into cache if enabled.

@param  DataAbstract $data
@return self
Set data into cache if enabled .