Export (0) Print
Expand All

OutputCacheAttribute Class

WCF RIA Services

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Provides a declarative way to enable output caching.

System.Object
  System.Attribute
    System.ServiceModel.DomainServices.Server.OutputCacheAttribute

Namespace:  System.ServiceModel.DomainServices.Server
Assembly:  System.ServiceModel.DomainServices.Server (in System.ServiceModel.DomainServices.Server.dll)

'Declaration
<AttributeUsageAttribute(AttributeTargets.Method Or AttributeTargets.Property Or AttributeTargets.Field, AllowMultiple := False,  _
	Inherited := True)> _
Public NotInheritable Class OutputCacheAttribute _
	Inherits Attribute
'Usage
Dim instance As OutputCacheAttribute

The OutputCacheAttribute type exposes the following members.

  NameDescription
Public methodOutputCacheAttribute(String)Initializes a new instance of the OutputCacheAttribute class with the specified cache profile.
Public methodOutputCacheAttribute(OutputCacheLocation)Initializes a new instance of the OutputCacheAttribute class with the specified OutputCacheLocation.
Public methodOutputCacheAttribute(OutputCacheLocation, Int32)Initializes a new instance of the OutputCacheAttribute class with the specified OutputCacheLocation and duration.
Top

  NameDescription
Public propertyCacheProfileGets the name of the cache settings.
Public propertyDurationGets the duration in seconds for which the response should be cached.
Public propertyLocationGets the locations where caching can be applied.
Public propertySqlCacheDependenciesGets or sets the SQL cache dependencies.
Public propertyTypeId (Inherited from Attribute.)
Public propertyUseSlidingExpirationGets or sets a value that indicates whether the duration uses a sliding expiration or an absolute expiration.
Public propertyVaryByHeadersGets or sets the headers on which a cached response is based.
Top

  NameDescription
Public methodEquals (Inherited from Attribute.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Attribute.)
Public methodGetType (Inherited from Object.)
Public methodIsDefaultAttribute (Inherited from Attribute.)
Public methodMatch (Inherited from Attribute.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top

  NameDescription
Explicit interface implemetationPrivate method_Attribute.GetIDsOfNames (Inherited from Attribute.)
Explicit interface implemetationPrivate method_Attribute.GetTypeInfo (Inherited from Attribute.)
Explicit interface implemetationPrivate method_Attribute.GetTypeInfoCount (Inherited from Attribute.)
Explicit interface implemetationPrivate method_Attribute.Invoke (Inherited from Attribute.)
Top

Use the cashing of output from method calls to improve performance. Apply the attribute to methods whose output you want to cache.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft