Removes all elements from the Cache.
Namespace: Alachisoft.NCache.Web.CachingAssembly: Alachisoft.NCache.Web (in Alachisoft.NCache.Web.dll) Version: 4.1.0.0 (4.1.0.0)
Syntax
C# |
---|
public void Clear() |
Visual Basic |
---|
Public Sub Clear |
Visual C++ |
---|
public: void Clear() |
Remarks
In most of the cases this method's implementation is close to O(1).
Note: If exceptions are enabled through the ExceptionsEnabled setting, this property throws exception incase of failure.
Examples
The following example demonstrates how to check for containment of an item in the Cache.
CopyC#
Cache cache = NCache.InitializeCache("myCache");
cache.Clear();