Answering my own question:
Changing the guts of favicon.php to:
if(file_exists("./cache/" . $_GET['i'] . ".spi"))
{
SimplePie_Misc::display_cached_file($_GET['i'], './cache/', 'spi',
'SimplePie_Cache', 'md5');
}
else
{
header("Location: image/feed-icon.png");
}
works.
In the previous code the file existence check would do an md5 hash on
$_GET['i']
to form the file name. But 'i' is already hashed, so it would never
find the file.
I don't know whether the last two parameters to the
display_cached_file
are necessary (they seem to be the defaults), but they work, so I'm
going with what works.
- Saul