CachedAttribute Class
Instructs the Visual Studio Tools for Office runtime to add the specified data object to the data cache in the document.
Assembly: Microsoft.VisualStudio.Tools.Applications.Runtime (in Microsoft.VisualStudio.Tools.Applications.Runtime.dll)
| Name | Description | |
|---|---|---|
![]() | CachedAttribute() | Initializes a new instance of the CachedAttribute class. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | (Inherited from Attribute.) |
![]() | GetHashCode() | (Inherited from Attribute.) |
![]() | GetType() | (Inherited from Object.) |
![]() | IsDefaultAttribute() | (Inherited from Attribute.) |
![]() | Match(Object^) | (Inherited from Attribute.) |
![]() | ToString() | (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | _Attribute::GetIDsOfNames(Guid%, IntPtr, UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() | _Attribute::GetTypeInfo(UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() | _Attribute::GetTypeInfoCount(UInt32%) | (Inherited from Attribute.) |
![]() ![]() | _Attribute::Invoke(UInt32, Guid%, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) | (Inherited from Attribute.) |
This attribute can only be used in a document-level customization for Word or Excel created by using the Office development tools in Visual Studio.
To add an object to the data cache in a document, the object must have a public type that meets the requirements of XmlSerializer. For more information about adding objects to the data cache, see Caching Data. For more information about using attributes, see Extending Metadata Using Attributes.
If you want to have greater control over the caching behavior of the data object, you can implement the ICachedType interface in the type of the object.
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.



