Nelmio\SecurityBundle\UserAgent\UAFamilyParser\PsrCacheUAFamilyParser::getUaFamily PHP Method

getUaFamily() public method

public getUaFamily ( $userAgent )
    public function getUaFamily($userAgent)
    {
        $id = $this->prefix . md5($userAgent);
        $item = $this->cache->getItem($id);
        if ($item->isHit()) {
            return $item->get();
        }
        $name = $this->parser->getUaFamily($userAgent);
        $this->cache->save($item->set($name)->expiresAfter($this->lifetime));
        return $name;
    }
PsrCacheUAFamilyParser