Something that would be handy

Tim Bray (tbray@opentext.com)
Thu, 12 Oct 95 16:09 PDT


It might be nice to enhance robots.txt to include a hint as to how
long the file ought to be cached by a Robot driver. People who don't
understand why probably ought to ignore this message. People who do
might want to suggest (a) reasons why this is a silly idea, (b) a
syntax/method for doing it, or (c) any implementation difficulties
that could ensue.

My suggestion, expressed in the form of perl code that could be used
to implement it:

if (/^\s*CacheHint:\s+(\d+)\s*([dhm])\s*$/)
{
$SecondsToCache = $1;
if ($2 eq 'd') { $SecondsToCache *= 60*60*24; }
elsif ($2 eq 'h') { $SecondsToCache *= 60*60; }
else { $SecondsToCache *= 60; }
}

Cheers, Tim Bray, Open Text Corporation (tbray@opentext.com)