Reputation: 21260
I am hosting my wcf services with http binding under IIS.
Lately I noticed that there is going on some caching of some sort.
I need to refresh my web service till I am getting the real data, and not that been few minutes ago.
Is there a way to disable this sort of caching ? and how to do so ...
Upvotes: 1
Views: 4280
Reputation: 3945
You could add an [AspNetCacheProfile("NoCacheProfile")]
attribute to the service method(s) that is defined like this in the web.config for the application (child of the <system.web>
element) :
<caching>
<outputCacheSettings>
<outputCacheProfiles>
<add name="NoCacheProfile" noStore="true" duration="0" varyByParam="none" enabled="true"/>
</outputCacheProfiles>
</outputCacheSettings>
</caching>
This is a .NET Framework 4 feature.
Upvotes: 1