Removes all elements from the client cache asynchronously.
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 override void ClearClientCacheAsync( AsyncCacheClearedCallback onAsyncCacheClearCallback ) |
Visual Basic |
---|
Public Overrides Sub ClearClientCacheAsync ( _ onAsyncCacheClearCallback As AsyncCacheClearedCallback _ ) |
Visual C++ |
---|
public: virtual void ClearClientCacheAsync( AsyncCacheClearedCallback^ onAsyncCacheClearCallback ) override |
Parameters
- onAsyncCacheClearCallback
- Type: Alachisoft.NCache.Web.Caching..::..AsyncCacheClearedCallback
Remarks
This is similar to ClearClientCache except that the operation is performed asynchronously.
A CacheCleared event is fired upon successful completion of this method.It is not
possible to determine if the actual operation has failed, therefore
use this operation for the cases when it does not matter much.
A delegate that, that can be used to get the result of
the Asynchronous Clear operation.
Examples
The following example demonstrates how to clear the client cache.
CopyC#
Or simply in a class deriving from [!:Alachisoft.NCache.Web.UI.NPage] or [!:Alachisoft.NCache.Web.UI.NUserControl].
CopyC#

void OnAsyncCacheCleared(object result) { ... } NCache.Cache.ClearClientCacheAsync(new AsyncCacheClearedCallback(OnAsyncCacheCleared));

Cache.ClearClientCacheAsync(new AsyncCacheClearedCallback(OnAsyncCacheCleared));