tags:

views:

1287

answers:

1

I have wirtten a RESTful WCF Service. Incorporating E-Tags, expires headers.

The caching works great when using it from a browser. However how does the caching work when calling it from a WCF Channel Factory or .NET Web Request Objects?

So in the scenario where I have my website calling the WCF restful service when a 304 not modified response is returned to me. How do I handle this. The browser detects this fine and returns the unmodified version from its cache.

However when the client is not the browser do I need to write my own version of the cache similiar to the way the browser caches?

Any help or insight would be much appreciated.

+2  A: 

Yes, you're going to have to handle that yourself, same as that you're responsbile for sending the datetime in the request, so the server can determine if there was a change. I would look at the RSS Bandit source for a sample implementation.

pb