AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

AdvantageCacheManager..::..Invalidate Method

Removes all cached items that belong to the specified categories. Categories are automatically scoped by domain and language before invalidation.

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

Syntax


public void Invalidate(
	string[] categories
)

Parameters

categories
Type: array<String>[]()[][]
An array of category names whose cached items should be removed.

Examples


Invalidate all cached items in the "articles" and "navigation" categories after a content update.
C#
var cache = new AdvantageCacheManager(eAdvantageCacheContainerType.WebServer, 1, 1);
cache.Invalidate(new[] { "articles", "navigation" });