[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Fri Feb 15 23:15:16 UTC 2008


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

Modified Files:
	ObjectCache.pm NamespaceCache.pm ServiceTypeCache.pm 
	ServiceCache.pm 
Log Message:

moby-live/Perl/MOBY/RDF/Ontologies/Cache ObjectCache.pm,1.1,1.2 NamespaceCache.pm,1.2,1.3 ServiceTypeCache.pm,1.2,1.3 ServiceCache.pm,1.6,1.7
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/ObjectCache.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/ObjectCache.pm	2007/12/17 18:50:53	1.1
+++ /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/ObjectCache.pm	2008/02/15 23:15:16	1.2
@@ -327,6 +327,23 @@
 			close FILE;
 		}
 	}
+	
+	# remove any old files that should not be cached
+	my $cachedir = File::Spec->catfile(
+							$self->{utils}->cachedir,
+							$self->{utils}->_clean( $self->{utils}->_endpoint ),
+							$self->{utils}->DATATYPES_CACHE
+	);
+
+	eval {
+		my @files = $self->{utils}->plainfiles($cachedir);
+		foreach my $path (@files) {
+			my $filename = substr $path, length($cachedir)+1;
+			unlink($path) unless $new_services{$filename};
+			$wasOld++;
+		}
+	};
+	
 	return $wasOld;
 }
 

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/NamespaceCache.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/NamespaceCache.pm	2008/02/13 22:47:40	1.2
+++ /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/NamespaceCache.pm	2008/02/15 23:15:16	1.3
@@ -327,6 +327,22 @@
 			close FILE;
 		}
 	}
+	# remove any old files that should not be cached
+	my $cachedir = File::Spec->catfile(
+							$self->{utils}->cachedir,
+							$self->{utils}->_clean( $self->{utils}->_endpoint ),
+							$self->{utils}->NAMESPACES_CACHE
+	);
+
+	eval {
+		my @files = $self->{utils}->plainfiles($cachedir);
+		foreach my $path (@files) {
+			my $filename = substr $path, length($cachedir)+1;
+			unlink($path) unless $new_services{$filename};
+			$wasOld++;
+		}
+	};
+	
 	return $wasOld;
 }
 

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/ServiceTypeCache.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/ServiceTypeCache.pm	2008/02/15 08:50:45	1.2
+++ /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/ServiceTypeCache.pm	2008/02/15 23:15:16	1.3
@@ -327,6 +327,23 @@
 			close FILE;
 		}
 	}
+	
+	# remove any old files that should not be cached
+	my $cachedir = File::Spec->catfile(
+							$self->{utils}->cachedir,
+							$self->{utils}->_clean( $self->{utils}->_endpoint ),
+							$self->{utils}->SERVICETYPES_CACHE
+	);
+
+	eval {
+		my @files = $self->{utils}->plainfiles($cachedir);
+		foreach my $path (@files) {
+			my $filename = substr $path, length($cachedir)+1;
+			unlink($path) unless $new_services{$filename};
+			$wasOld++;
+		}
+	};
+	
 	return $wasOld;
 }
 

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/ServiceCache.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/ServiceCache.pm	2008/02/15 22:57:28	1.6
+++ /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Cache/ServiceCache.pm	2008/02/15 23:15:16	1.7
@@ -334,12 +334,15 @@
 							$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};
-	}
 	
+	eval {
+		my @files = $self->{utils}->plainfiles($cachedir);
+		foreach my $path (@files) {
+			my $filename = substr $path, length($cachedir)+1;
+			unlink($path) unless $new_services{$filename};
+			$wasOld++;
+		}
+	};
 	return $wasOld;
 }
 




More information about the MOBY-guts mailing list