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

on compileIfDirty (adroutline, identifier, adrdirectoryinfo,, owneremail=user.prefs.mailAddress) {
		<<5/10/02; 1:56:16 PM by JES
			<<Created. Cribbed from
	on clearcache () {
		new (tabletype, @adrdirectoryinfo^.cache); (identifier, parentOf (parentOf (adrdirectoryinfo^)^))};
	bundle { //rebuild the xml structure if it needs it
		local (flrebuild = false);
		if defined (adrdirectoryinfo^.xmlstruct) {
			if timemodified (adroutline) > timemodified (@adrdirectoryinfo^.xmlstruct) {
				flrebuild = true}}
		else {
			flrebuild = true};
		if flrebuild {
			xml.compile (op.outlinetoxml (adroutline, ownername, owneremail), @adrdirectoryinfo^.xmlstruct);
			clearcache ()}};
	bundle { //clear the cache if one of the templates has changed
		try {
			local (pta = html.getpagetableaddress ());
			if timeCreated (@adrdirectoryinfo^.cache) < pta^.newsSite^.directory.templateModified {
				clearcache ()}}}}

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.