
When applied to a service operation, indicates the ASP.NET output cache profile in the configuration file that should be used by to cache responses from the operation in the ASP .NET Output Cache.
Assembly: System.ServiceModel.Web (in System.ServiceModel.Web.dll)
For more information about the kinds of setting you can make with the Output Cache Profile, see ASP.NET Cache Settings.
The following example shows how to apply the AspNetCacheProfileAttribute attribute to a service operation. In this case, the cache profile named “CacheFor60Seconds” will be used for the GetCustomer operation
The following configuration snippet shows how the “CacheFor60Seconds” cache profile is specified.
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<caching>
<outputCacheSettings>
<outputCacheProfiles>
<add name="CacheFor60Seconds" duration="60" varyByParam="format" varyByHeader="Accept" />
</outputCacheProfiles>
</outputCacheSettings>
</caching>
</system.web>
</configuration>
System.Attribute
System.ServiceModel.Web.AspNetCacheProfileAttribute
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.