Set the URL to be used for caching.
340749
def set_cache_url (self):
        """"""
        # remove anchor from cached target url since we assume
        # URLs with different anchors to have the same content
        self.cache_url = urlutil.urlunsplit(self.urlparts[:4]+[u''])
        if self.cache_url is not None:
            assert isinstance(self.cache_url, unicode), repr(self.cache_url)
1203010
def set_url_part(url, **kwargs):
    """"""
    d = parse_url_to_dict(url)

    d.update(kwargs)

    return unparse_url_dict(d)
58718
def setUrl(self, url):
        
        if isUrl(url):
            self._url = url
        else:
            raise exceptions.BadUrlException(url)
        return self
577264
def set_search_url(self, url):
        

        if url[0] == '?':
            url = url[1:]

        self.arguments = {}
        for key, value in parse_qs(url).items():
            self.arguments.update({key: unquote(value[0])})
340132
public void setUrlAttribute(String name, String value) {
		ensureValue();
		Attribute attribute = new UrlAttribute(value);
		attribute.setEditable(isEditable(name));
		getValue().getAllAttributes().put(name, attribute);
	}
758730
public void setUrlAttribute(String name, String value) {
		ensureAttributes();
		Attribute attribute = new UrlAttribute(value);
		attribute.setEditable(isEditable(name));
		getAllAttributes().put(name, attribute);

	}
958498
def set(self, key, response):
        """"""
        key = self._clean_key(key)
        path = os.path.join(self.cache_dir, key)

        with open(path, 'wb') as f:
            status_str = 'status: {0}\n'.format(response.status_code)
            f.write(status_str.encode('utf8'))
            encoding_str = 'encoding: {0}\n'.format(response.encoding)
            f.write(encoding_str.encode('utf8'))
            for h, v in response.headers.items():
                # header: value\n
                f.write(h.encode('utf8'))
                f.write(b': ')
                f.write(v.encode('utf8'))
                f.write(b'\n')
            # one blank line
            f.write(b'\n')
            f.write(response.content)
767110
def _build_url(self, shorten=True):
        """"""
        self.url = URL_FORMAT.format(*self._get_url_params(shorten=shorten))
131487
@Override
    public void setCacheability(String cacheability) {
        Preconditions.checkArgument(
                this.urlType == UrlType.RESOURCE,
                "UrlType must be %s but was %s",
                UrlType.RESOURCE,
                this.urlType);
        this.cacheability = cacheability;
    }
375803
private function setUrl() {

		$url = Router :: url($this -> identifier, $this -> params);

		if(strlen($url) > 0) {
			$url = '/' . $url;
		}

		Request :: setURI($url);
		Router :: setUrl($url);
	}
24375
public function setUrl(string $url): RequestContext
    {
        $this->assertValidUrl($url);

        $this->url = $url;

        return $this;
    }
583632
private void doOpenURL()
	{
		getURLDialog().setVisible(true);
		String url = getURLDialog().getURL();
		if (url!=null && url.length()!=0) doOpenURL(url);
	}
1322884
public function setUrl($url)
    {
        $url = $this->url($url)->getPath();
        $this->url = $this->str($url)->trimRight('/')->val() . '/';
    }
605945
def _set_url(self, url):
    
    original_url = self._url
    try:
      self._update_index(url)
    except:
      self._url = original_url
      raise
1004673
def cache_path_for_url(url):
    """"""
    m = hashlib.md5()
    m.update(url)
    digest = m.hexdigest()
    return os.path.join(CACHE_DIRECTORY, '%s.html' % digest)
770949
def add_url(self):
        """"""
        if self.url:
            self.url_data.add_url(self.url, line=self.parser.CurrentLineNumber,
                column=self.parser.CurrentColumnNumber)
            self.url = u""
464474
def set_uri(self, uri):
        '''
        
        '''
        publicObj = self.get_public()
        if publicObj is not None:
            publicObj.set_uri(uri)
        else:
            publicObj = Cpublic()
            publicObj.set_uri(uri)
            self.set_public(publicObj)