Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

We have a sample that illustrates how to do this (using .NET 4) http://code.msdn.microsoft.com/cannonicalRESTEntity

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top