[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Fri Feb 15 22:57:28 UTC 2008


kawas
Fri Feb 15 17:57:28 EST 2008
Update of /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache
In directory dev.open-bio.org:/tmp/cvs-serv28808/Perl/MOBY/RDF/Ontologies/Cache

Modified Files:
	ServiceCache.pm 
Log Message:

moby-live/Perl/MOBY/RDF/Ontologies/Cache ServiceCache.pm,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/ServiceCache.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/ServiceCache.pm	2007/12/17 18:53:02	1.5
+++ /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/ServiceCache.pm	2008/02/15 22:57:28	1.6
@@ -327,6 +327,19 @@
 			close FILE;
 		}
 	}
+	
+	# iterate through file system list and if the authority is missing from new_services delete it from the cache
+	my $cachedir = File::Spec->catfile(
+							$self->{utils}->cachedir,
+							$self->{utils}->_clean( $self->{utils}->_endpoint ),
+							$self->{utils}->SERVICES_CACHE
+	);
+	my @files = $self->{utils}->plainfiles($cachedir);
+	foreach my $path (@files) {
+		my $filename = substr $path, length($cachedir)+1;
+		unlink($path) unless $new_services{$filename};
+	}
+	
 	return $wasOld;
 }
 




More information about the MOBY-guts mailing list