DataCacheHelperGetCachedObject Method (String, String, DataCacheHelperGetEventHandler2BaseInfo, String, String, String, Int32, Boolean, DataCacheHelperGetCacheDependencyEventHandlerBaseInfo, String) |
Gets the object by its name and site name using the cache.
Namespace: CMS.DataEngineAssembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 8.2.23
Syntax public static BaseInfo GetCachedObject(
string name,
string siteName,
DataCacheHelperGetEventHandler2<BaseInfo, string, string> handler,
string key,
int cacheMinutes,
bool requestCache,
DataCacheHelperGetCacheDependencyEventHandler<BaseInfo> dependencyCallback,
string context
)
Parameters
- name
- Type: SystemString
Name of the object - siteName
- Type: SystemString
Site name - handler
- Type: CMS.DataEngineDataCacheHelperGetEventHandler2BaseInfo, String, String
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:
BaseInfoSee Also