Removes the objects from the Cache.

Namespace: Alachisoft.NCache.Web.Caching
Assembly: Alachisoft.NCache.Web (in Alachisoft.NCache.Web.dll) Version: 4.3.0.0 (4.3.0.0)

Syntax

C#
public override IDictionary RemoveBulk(
	string[] keys,
	DSWriteOption dsWriteOption,
	DataSourceItemsRemovedCallback onDataSourceItemsRemovedCallback
)
Visual Basic
Public Overrides Function RemoveBulk ( 
	keys As String(),
	dsWriteOption As DSWriteOption,
	onDataSourceItemsRemovedCallback As DataSourceItemsRemovedCallback
) As IDictionary
Visual C++
public:
virtual IDictionary^ RemoveBulk(
	array<String^>^ keys, 
	DSWriteOption dsWriteOption, 
	DataSourceItemsRemovedCallback^ onDataSourceItemsRemovedCallback
) override

Parameters

keys
Type: array<System..::..String>[]()[][]
The cache keys used to reference the item.
dsWriteOption
Type: Alachisoft.NCache.Web.Caching..::..DSWriteOption
onDataSourceItemsRemovedCallback
Type: Alachisoft.NCache.Web.Caching..::..DataSourceItemsRemovedCallback

Return Value

Type: IDictionary
The items removed from the Cache. If the value in the keys parameter is not found, returns a null reference (Nothing in Visual Basic).

Remarks

Note: If exceptions are enabled through the ExceptionsEnabled setting, this property throws exception incase of failure.

Examples

The following example demonstrates how you can remove an item from your application's Cache object.
 Copy imageCopy
NCache.Cache.Remove(keys);
Or simply in a class deriving from [!:Alachisoft.NCache.Web.UI.NPage] or [!:Alachisoft.NCache.Web.UI.NUserControl].
 Copy imageCopy
Cache.Remove(keys);

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionkeys contains a null reference (Nothing in Visual Basic).
System..::..ArgumentExceptionkeys is not serializable.

See Also