Class AutoIndexCache
- Namespace
- AutoIndexCache
- Assembly
- AutoIndexCache.dll
A thread-safe cache that automatically indexes cached items.
public class AutoIndexCache : IAutoIndexCache
- Inheritance
-
AutoIndexCache
- Implements
- Inherited Members
Remarks
All public and protected members of AutoIndexCache are thread-safe and may be used concurrently from multiple threads.
Methods
Items<TItem>()
Gets the list of cached items of the type TItem
from this cache.
public IItemsList<TItem> Items<TItem>() where TItem : class
Returns
- IItemsList<TItem>
An instance of IItemsList<TItem> that allows to access the cached items of the type
TItem
.
Type Parameters
TItem
The type of cache items to get.
Examples
var cache = new AutoIndexCache();
cache.Items<User>().Fill(this.LoadUsers());
var users = cache.Items<User>().GetAllItems();