public function setCache($adapter, $ttl = 3600)
    {
        $adapter->setOption('ttl', $ttl);
        $this->cache = new Cache($adapter);

        return $this;
    }
public function setCache($adapter, $ttl = 3600)
    {
        $adapter->setOption('ttl', $ttl);
        $this->cache = new Cache($adapter);

        return $this;
    }
public function setCache ( $ adapter , $ ttl = 3600 ) { $ adapter -> setOption ( 'ttl' , $ ttl ) ; $ this -> cache = new Cache ( $ adapter ) ; return $ this ; }
Set the cache component.

@param \Desarrolla2\Cache\Adapter\AdapterInterface $adapter See https://github.com/desarrolla2/Cache
@param int $ttl Time to live in seconds
@return $this
Set the cache component .