version 1.176, 2001/11/22 19:02:07
|
version 1.177, 2001/11/22 20:09:22
|
Line 2239 sub metadata {
|
Line 2239 sub metadata {
|
$uri=~s/\.meta$//; |
$uri=~s/\.meta$//; |
# |
# |
# Is the metadata already cached? |
# Is the metadata already cached? |
# If "keys" are set, the assumption is that everything is already cached. |
# Look at timestamp of caching |
# Everything is cached by the main uri, libraries are never directly cached |
# Everything is cached by the main uri, libraries are never directly cached |
# |
# |
unless (abs($metacache{$uri.':cachedtimestamp'}-time)<600) { |
unless (abs($metacache{$uri.':cachedtimestamp'}-time)<600) { |
Line 2326 sub metadata {
|
Line 2326 sub metadata {
|
if (defined($depthcount)) { $depthcount++; } else |
if (defined($depthcount)) { $depthcount++; } else |
{ $depthcount=0; } |
{ $depthcount=0; } |
if ($depthcount<20) { |
if ($depthcount<20) { |
$metacache{$uri.':keys'}.=','. |
map { |
&metadata($uri,'keys', |
$metathesekeys{$_}=1; |
$parser->get_text('/import'),$unikey, |
} split(/\,/,&metadata($uri,'keys', |
$depthcount); |
$parser->get_text('/import'),$unikey, |
|
$depthcount)); |
} |
} |
|
|
} else { |
} else { |
|
|
if (defined($token->[2]->{'name'})) { |
if (defined($token->[2]->{'name'})) { |
Line 2355 sub metadata {
|
Line 2355 sub metadata {
|
} |
} |
$metacache{$uri.':keys'}=join(',',keys %metathesekeys); |
$metacache{$uri.':keys'}=join(',',keys %metathesekeys); |
$metacache{$uri.':cachedtimestamp'}=time; |
$metacache{$uri.':cachedtimestamp'}=time; |
|
# this is the end of "was not already recently cached |
} |
} |
return $metacache{$uri.':'.$what}; |
return $metacache{$uri.':'.$what}; |
} |
} |