Click or drag to resize
DataCacheHelper.GetCachedObject Method (Int32, DataCacheHelper.GetEventHandler1<BaseInfo, Int32>, String, Int32, Boolean, DataCacheHelper.GetCacheDependencyEventHandler<BaseInfo>, 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,
	DataCacheHelper. GetEventHandler1<BaseInfo, int> handler,
	string key,
	int cacheMinutes,
	bool requestCache,
	DataCacheHelper. GetCacheDependencyEventHandler<BaseInfo> dependencyCallback,
	string context
)

Parameters

id
Type: System.Int32
ID of the object
handler
Type: CMS.DataEngine.DataCacheHelper.GetEventHandler1<BaseInfo, Int32>
Handler to retrieve the object from the database
key
Type: System.String
Cache key to use
cacheMinutes
Type: System.Int32
Cache minutes
requestCache
Type: System.Boolean
Use request cache
dependencyCallback
Type: CMS.DataEngine.DataCacheHelper.GetCacheDependencyEventHandler<BaseInfo>
Callback to get the cache dependency for the object
context
Type: System.String
Context string

Return Value

Type: BaseInfo
See Also