Method RemoveBulk
RemoveBulk(String[], DSWriteOption, String, DataSourceItemsRemovedCallback)
Removes the objects from the Cache.
Declaration
public override IDictionary RemoveBulk(string[] keys, DSWriteOption dsWriteOption, string providerName, DataSourceItemsRemovedCallback onDataSourceItemsRemovedCallback)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | keys | The cache keys used to reference the item. |
DSWriteOption | dsWriteOption | |
System.String | providerName | |
DataSourceItemsRemovedCallback | onDataSourceItemsRemovedCallback |
Returns
Type | Description |
---|---|
System.Collections.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). |
Overrides
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.
NCache.Cache.Remove(keys);
Or simply in a class deriving from
Cache.Remove(keys);
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentException |
|
RemoveBulk(String[], DSWriteOption, DataSourceItemsRemovedCallback)
Removes the objects from the Cache.
Declaration
public override IDictionary RemoveBulk(string[] keys, DSWriteOption dsWriteOption, DataSourceItemsRemovedCallback onDataSourceItemsRemovedCallback)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | keys | The cache keys used to reference the item. |
DSWriteOption | dsWriteOption | |
DataSourceItemsRemovedCallback | onDataSourceItemsRemovedCallback |
Returns
Type | Description |
---|---|
System.Collections.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). |
Overrides
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.
NCache.Cache.Remove(keys);
Or simply in a class deriving from
Cache.Remove(keys);
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentException |
|