DeviceDetector\Parser\ParserAbstract::setCache PHP Method

setCache() public method

Sets the Cache class
public setCache ( DeviceDetector\Cache\Cache | CacheProvider $cache )
$cache DeviceDetector\Cache\Cache | Doctrine\Common\Cache\CacheProvider
    public function setCache($cache)
    {
        if ($cache instanceof Cache || class_exists('\\Doctrine\\Common\\Cache\\CacheProvider') && $cache instanceof \Doctrine\Common\Cache\CacheProvider) {
            $this->cache = $cache;
            return;
        }
        throw new \Exception('Cache not supported');
    }