--- Artwork.pm 2008-06-19 10:02:46.000000000 -0500 +++ /root/Artwork.pm 2008-08-09 11:02:09.000000000 -0500 @@ -44,6 +44,7 @@ my $prefs = preferences('server'); tie my %lastFile, 'Tie::Cache::LRU', 32; +tie my %statCache, 'Tie::Cache::LRU', 1024; # Public class methods sub findArtwork { @@ -345,7 +346,11 @@ $file = $parentDir->file($file)->stringify; - next unless -f $file; + if (! exists $statCache{$file}) { + $statCache{$file} = (-f $file ? 1 : 0); + } + + next if (!$statCache{$file}); my ($body, $contentType) = $class->getImageContentAndType($file);