Method GetEnumerator
GetEnumerator()
Retrieves a dictionary enumerator used to iterate through the key settings and their values contained in the cache.
Declaration
public virtual IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | An enumerator to iterate through the Cache object. |
Remarks
If items are added or removed from the cache while enumerating through the items the behavior is not predictable. It is therefore advised not to update the cache keys while enumerating.
Note: Just like Count in a cluster especially partitioned this operation is an expensive one and may require network calls. It is therefore advised to use this method only when required.
Note: If exceptions are enabled through the ExceptionsEnabled setting, this property throws exception in case of failure.