a fairly easy to implement cache that does not rely on extra code is to use squid. setup squid properly and configure your LWP requests to use squid as the proxy
also, if the pdb format is always available...you could provide the other formats with your own software, if it doesn't crunch the server with too many requests.
another idea = write the file links as dynamic javascript that does a HEAD and crosses out unavailable formats. this shifts the connections to the client...so if their search returned lots of links, it'll be up to their machine to resolve the availability of the file formats. this also makes certain that the links are truly available from the client, not just from your server.
the hardest line to type correctly is: stty erase ^H