Cache HTTP responses

M

Mattias Holmlund

Hi,

I'm looking for a C#-module that can cache the results of
HTTP-requests persistently on disk. I want to write a program that
fetches data by issuing a number of HTTP-get requests and process the
results. The data will only rarely change, so I would like to use
module that issues proper ETag and If-Modified-Since http-headers to
avoid downloading the data if it hasn't changed.

I haven't been able to find such a module among the standard modules.
Has anyone written such a module?

Regards,

Mattias Holmlund
 
J

Joerg Jooss

Mattias said:
Hi,

I'm looking for a C#-module that can cache the results of
HTTP-requests persistently on disk. I want to write a program that
fetches data by issuing a number of HTTP-get requests and process the
results. The data will only rarely change, so I would like to use
module that issues proper ETag and If-Modified-Since http-headers to
avoid downloading the data if it hasn't changed.

I haven't been able to find such a module among the standard modules.
Has anyone written such a module?

A full blown managed code solution utilizing the WinINet cache comes
with .NET 2.0.

But you can use those conditional GETs and ETags with HttpWebRequest --
you'll just need to implement your own cache or wrap WinINet.

Cheers,
 
M

mattias.holmlund

Joerg said:
A full blown managed code solution utilizing the WinINet cache comes
with .NET 2.0.

But you can use those conditional GETs and ETags with HttpWebRequest --
you'll just need to implement your own cache or wrap WinINet.

Thanks for you reply. I'll probably implement my own webcache using
HttpWebRequest then. I only need it to handle simple GET-requests, so
it will be relatively straight-forward.

/Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top