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

system.verbs.builtins.xml.pubsub.deleteExpiredSubscriptions

on deleteExpiredSubscriptions (adrTable, adrStats=nil) {
	<<Delete expired subscriptions.
		<<1/15/02; 6:16:11 PM by PBS
	xml.pubsub.initTable (adrTable);
	local (i, adrurl, ctdeleted = 0, cttotal = 0);
	for i = sizeof (adrTable^.notify) downto 1 {
		adrurl = @adrTable^.notify [i];
		local (j, adrsub, now = clock.now ());
		for j = sizeof (adrurl^) downto 1 {
			adrsub = @adrurl^ [j];
			if now > adrsub^.timeExpires {
				delete (adrsub);
				ctdeleted++};
			cttotal++};
		if sizeof (adrurl^) == 0 { //everything deleted
			delete (adrurl)}};
	if ctdeleted > 0 {
		if adrStats != nil {
			adrStats^.ctDeletedSubscriptions = ctdeleted;
			adrStats^.ctTotalSubscriptions = cttotal}}}



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.