Tuesday, March 08, 2011 at 7:02 PM.
scripting2Suite.server.domainMapper.index
on index () {
<<Changes
<<3/7/11; 4:15:50 PM by DW
<<Add a cache so that if there's an error, we still have something to return.
<<6/29/10; 12:15:38 PM by DW
<<Created.
local (adrdata = scripting2suite.init ());
local (adrstory = address (adrdata^.server.domains.[host]));
local (adrcache = @system.temp.scripting2.server.domainMapperCache);
if not defined (adrcache^) {
new (tabletype, adrcache);
};
try {
local (s = tcp.httpreadurl (adrstory^.url));
adrcache^.[host] = s;
return (s)}
else {
if defined (adrcache^.[host]) {
return (adrcache^.[host])}
else {
scripterror (tryerror)}}}
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.