Click or drag to resize

CacheManagerTryGetObject Method

Attempt to retrieve a cached object item. Use CacheObject(Object, String, DateTime, String, String, String) to cache the object. See TryGetString(String, String, String, DateTime) for retrieving string data, or TryGetTable(String, String, DataTable, NullableDateTime) for retrieving DataTables. Together the cacheID and ID should form a unique identifier. Having uniquely identified the item in this manner, the item's expiry and optional signature match are used to determine whether or not to accept the item as a cache hit and return it.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public bool TryGetObject(
	string cacheID,
	string signature,
	Type type,
	out Object obj,
	out DateTime dt
)

Parameters

cacheID
Type: SystemString
The ID of the data, should be unique when used in conjunction with the current user ID.
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.
type
Type: SystemType
The type of object to retrieve. This must match the type of the originally cached object.
obj
Type: SystemObject
The data retrieved from cache, if a hit was made, else null.
dt
Type: SystemDateTime
The date/time (UTC) that the item was cached, if a hit was made.

Return Value

Type: Boolean
True if a cache hit was made, else false.
See Also