Click or drag to resize
DataCacheHelperGetCachedObject Method (Int32, DataCacheHelperGetEventHandler1BaseInfo, Int32, String, Int32, Boolean, DataCacheHelperGetCacheDependencyEventHandlerBaseInfo, String)
Gets the object by its ID using the cache.

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 8.2.23
Syntax
C#
public static BaseInfo GetCachedObject(
	int id,
	DataCacheHelperGetEventHandler1<BaseInfo, int> handler,
	string key,
	int cacheMinutes,
	bool requestCache,
	DataCacheHelperGetCacheDependencyEventHandler<BaseInfo> dependencyCallback,
	string context
)

Parameters

id
Type: SystemInt32
ID of the object
handler
Type: CMS.DataEngineDataCacheHelperGetEventHandler1BaseInfo, Int32
Handler to retrieve the object from the database
key
Type: SystemString
Cache key to use
cacheMinutes
Type: SystemInt32
Cache minutes
requestCache
Type: SystemBoolean
Use request cache
dependencyCallback
Type: CMS.DataEngineDataCacheHelperGetCacheDependencyEventHandlerBaseInfo
Callback to get the cache dependency for the object
context
Type: SystemString
Context string

Return Value

Type: BaseInfo
See Also