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
)
Public Function TryGetObject (
cacheID As String,
signature As String,
type As Type,
<OutAttribute> ByRef obj As Object,
<OutAttribute> ByRef dt As DateTime
) As Boolean
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:
BooleanTrue if a cache hit was made, else false.
See Also