Monday, November 08, 2010 at 12:05 AM.

system.verbs.builtins.radio.outliner.preCacheUrl

on preCacheUrl (url) {
	<<Changes
		<<3/31/02; 6:32:12 PM by JES
			<<Call tcp.httpClient with flAcceptOpml true.
		<<3/25/02; 5:51:05 PM by JES
			<<Created.
	local (adrcache = @system.temp.frontier.openUrlCache);
	if not defined (adrcache^) {
		new (tableType, adrcache)};
	adrincache = @adrcache^.[url];
	if not defined (adrincache^) {
		new (tableType, adrincache)};
	local (urlparts = string.urlSplit (url));
	local (server = urlparts[2], port = 80);
	if server contains ":" {
		port = string.nthField (server, ":", 2);
		server = string.nthField (server, ":", 1)};
	adrincache^.xmltext = string.httpResultSplit (tcp.httpClient (server:server, port:port, path:urlparts[3], flAcceptOpml:true));
	return (adrincache)}
<<bundle //testing
	<<preCacheUrl ("http://radio.weblogs.com/0001100/instantOutliner/elvisPresley.opml")



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.