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

on initDirectoryTable (identifier, adrdirectories) {
		<<11/26/2000; 6:47:01 PM by DW
			<<Created. Locate the subtable of the directories table that keeps information about the indicated message. Transition from the old way, where we stored the directory information as a sub-table of the dg message table. The contents of this table was being transmitted when Radio opened it as an outline, it was unnecessary bloat. Better to keep this stuff in a separate special place.
			<<The directories table is at the top level of the discussion group structure.
		<<12/5/2000; 8:34:42 PM by DW
			<<Add initialization for the "expires" sub-table, which contains the expiration time for each of the cached directory pages.
	if not defined (adrdirectories^) {
		new (tabletype, adrdirectories)};
	local (adrtables = @adrdirectories^.tables);
	if not defined (adrtables^) {
		new (tabletype, adrtables)};
	local (adrtable = @adrtables^.[identifier]);
	if not defined (adrtable^) {
		new (tabletype, adrtable)};
	bundle { //init the cache
		local (adrcache = @adrtable^.cache);
		if not defined (adrcache^) {
			new (tabletype, adrcache)};
		if not defined (adrcache^.pages) {
			new (tabletype, @adrcache^.pages)};
		if not defined (adrcache^.expires) {
			new (tabletype, @adrcache^.expires)};
		if not defined (adrcache^.titles) {
			new (tabletype, @adrcache^.titles)};
		if not defined (adrcache^.xmlstructs) {
			new (tabletype, @adrcache^.xmlstructs)}};
	bundle { //init hits table
		local (adrhits = @adrtable^.hits);
		if not defined (adrhits^) {
			new (tabletype, adrhits)}};
	return (adrtable)}
<<bundle //test code
	<<local (adrmsg = @worldoutlineManilaWebsite.["#discussionGroup"].messages.["0000004"])
	<<for i = 1 to 1000
		<<initDirectoryTable (adrmsg)

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.