Click or drag to resize

CacheManagerCacheObject Method

Serialize an object and cache it to the operational data cache. Note that the object must be serializable to XML. See CacheString(String, String, DateTime, String, String, String) for caching string data, or CacheTable(DataTable, String, DateTime, String, String, String) for caching DataTables. Together the cacheID and ID should form a unique identifier. Use TryGetObject(String, String, Type, Object, DateTime) to retrieve the cached object from cache.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public bool CacheObject(
	Object obj,
	string cacheID,
	DateTime expiryUTC,
	string signature,
	string description,
	string relID
)

Parameters

obj
Type: SystemObject
The object to cache.
cacheID
Type: SystemString
The ID of the data, should be unique when used in conjunction with the current user ID.
expiryUTC
Type: SystemDateTime
The UTC date/time that the cache should expire.
signature
Type: SystemString
Optional data signature for detecting changes in the data characteristics that should cause the item to expire -- typically the SQL statement used to generate the data.
description
Type: SystemString
An optional description of the cached data.
relID
Type: SystemString
An optional value defining whether this cached data relates to a specific record in the database.

Return Value

Type: Boolean
True if the data replaces an existing cached item, else false.
See Also