KGy SOFT

ICache Interface

KGy SOFT Core Libraries Help

Namespace:  KGySoft.Collections
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.4.0
Syntax

public interface ICache : IDictionary, ICollection, 
	IEnumerable

The ICache type exposes the following members.

Properties

  NameDescription
Public propertyBehavior
Gets or sets the cache behavior when cache is full and an element has to be removed. The cache is full, when Count reaches the Capacity.
Public propertyCapacity
Gets or sets the capacity of the cache. If new value is smaller than elements count (value of the Count property), then old or least used elements (depending on Behavior) will be removed from the ICache.
Public propertyEnsureCapacity
Gets or sets whether adding the first item to the cache or resetting Capacity on a non-empty cache should allocate memory for all cache entries.
Top
Methods

  NameDescription
Public methodGetStatistics
Gets statistics of the cache.
Public methodGetValueUncached
Reloads the value into the cache even if it was already loaded using the item loader that was passed to the constructor.
Public methodRefreshValue
Refreshes the value in the cache even if it was already loaded.
Public methodReset
Clears the cache and resets statistics.
Public methodTouch
Renews the value with the specified key in the evaluation order.
Top
Extension Methods

  NameDescription
Public Extension MethodIndexOf(FuncObject, Boolean)Overloaded.
Searches for an element in the source enumeration where the specified predicate returns .
(Defined by EnumerableExtensions.)
Public Extension MethodIndexOf(Object)Overloaded.
Searches for an element in the source enumeration.
(Defined by EnumerableExtensions.)
Public Extension MethodIsNullOrEmpty
Determines whether the specified source is  or empty (has no elements).
(Defined by EnumerableExtensions.)
Public Extension MethodTryAdd
Tries to add the specified item to the collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryAddRange
Tries to add the specified collection to the target collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryClear
Tries to remove all elements from the collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryGetElementAt
Tries to get an item at the specified index in the collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryInsert
Tries to insert the specified item at the specified index to the collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryInsertRange
Tries to insert the specified collection into the target collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryRemove
Tries to remove the specified item from to the collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryRemoveAt
Tries to remove an item at the specified index from the collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryRemoveRange
Tries to remove count amount of items from the specified collection at the specified index.
(Defined by EnumerableExtensions.)
Public Extension MethodTryReplaceRange
Tries to remove count amount of items from the target at the specified index, and to insert the specified collection at the same position. The number of elements in collection can be different from the amount of removed items.
(Defined by EnumerableExtensions.)
Public Extension MethodTrySetElementAt
Tries to set the specified item at the specified index in the collection.
(Defined by EnumerableExtensions.)
Top
See Also

Reference