Method GetJsonEnumerator
GetJsonEnumerator()
Retrieves a dictionary enumerator used to iterate through the key settings and their values as JSON objects contained in the cache.
Declaration
IEnumerator GetJsonEnumerator()
Returns
Type | Description |
---|---|
IEnumerator | An enumerator to iterate through the Alachisoft.NCache.Client.Cache as JSON objects. |
Remarks
To use GetJsonEnumerator method, cache serilization must be set to JSON instead of Binary.
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 Alachisoft.NCache.Client.Cache.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.