I have now uploaded my HTTP::TransparentCache module to CPAN. It implements a persistent cache for HTTP get-requests. The module should work seamlessly with all code that uses LWP to make HTTP requests. All you have to do is add
use HTTP::TransparentCache; HTTP::TransparentCache::init({ BasePath => '/tmp/cache*' } ); at the top of your perl-program. After that, all get-requests, through LWP::Simple as well as the more advanced LWP-classes, will be cached. This initial version does not cache any requests where the response is saved in a file by LWP::UserAgent or where data is returned with a callback. I intend to fix this in a later release, but for now these requests are sent directly to LWP::UserAgent bypassing the cache. Caching is also disabled for any requests containing a Range-header. Please test the module with your favorite project. There is a simple example in examples/check_server that can be used to test if your http-server supports caching. Note that the HTTP::TransparentCache module always checks with the server before returning data from the cache. This means that you never run the risk of receiving old data from the cache. The module will hopefully show up on CPAN soon. In the meantime, you can read the pod at http://www.holmlund.se/HTTP-TransparentCache.html and download the code from http://www.holmlund.se/HTTP-TransparentCache-0.1.tar.gz /Mattias