AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

AdvantageCacheManager Constructor (eAdvantageCacheContainerType, Int32, Int32)

Initializes a new instance of the AdvantageCacheManager class using a web-server cache container. For database-backed caching, use the overload that accepts a SQL connection.

Namespace:  AdvantageCMS.Core.Utils.Cache
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


public AdvantageCacheManager(
	eAdvantageCacheContainerType cacheContainerType,
	int domainId,
	int languageId
)

Parameters

cacheContainerType
Type: AdvantageCMS.Core.Utils.Cache.Containers..::..eAdvantageCacheContainerType
The type of cache backing store to use.
domainId
Type: Int32
The domain identifier used to scope cache keys.
languageId
Type: Int32
The language identifier used to scope cache keys.

Examples


Create a cache manager backed by the web server's in-memory cache.
C#
var cache = new AdvantageCacheManager(eAdvantageCacheContainerType.WebServer, domainId: 1, languageId: 1);
cache.Store<string>("greeting", "Hello", "messages", 60);