Appearance
GetOrInsert Method
Definition
- Namespace:
JASE - Assembly:
JASE.Caching.dll
Overloads
| Name | Description |
|---|---|
T GetOrInsert(string key, Func<T> factory) | Retrieves an item from the cache cast to type of T, or inserts using the provided Factory function |
T GetOrInsert(string key, string filename, Func<T> factory) | Retrieves an item from the cache cast to type of T, or inserts using the provided Factory function and file dependency |
T GetOrInsert(string key, Func<T> factory, TimeSpan expiration, bool sliding = null) | Retrieves an item from the cache cast to type of T, or inserts using the provided Factory function with TimeSpan expiration |
T GetOrInsert(string key, Func<T> factory)
csharp
T GetOrInsert(string key, Func<T> factory)Retrieves an item from the cache cast to type of T, or inserts using the provided Factory function
T GetOrInsert(string key, Func<T> factory, TimeSpan expiration, bool sliding = null)
csharp
T GetOrInsert(string key, Func<T> factory, TimeSpan expiration, bool sliding = null)Retrieves an item from the cache cast to type of T, or inserts using the provided Factory function with TimeSpan expiration
T GetOrInsert(string key, string filename, Func<T> factory)
csharp
T GetOrInsert(string key, string filename, Func<T> factory)Retrieves an item from the cache cast to type of T, or inserts using the provided Factory function and file dependency