public function match($url)
    {
        if ($this->isString($url)) {
            $url = $this->url($url);
        } else {
            $url = StdObjectWrapper::isUrlObject($url) ? $url : $this->url('');
        }

        // get it from cache
        if (($result = $this->loadFromCache('match.' . $url->val())) !== false) {
            return $this->unserialize($result);
        }

        // try to match the url
        $result = $this->urlMatcher->match($url);

        // cache it
        $cacheResult = $this->isArray($result) ? $this->serialize($result) : $result;
        $this->saveToCache('match.' . $url->val(), $cacheResult);

        return $result;
    }