Accessing cache (no cache actually used)
More...
|
bool | Get< T > (string key, out T item) |
| Retrieves an item from the Cache More...
|
|
void | Set< T > (string key, T item) |
| Sets an item into cache More...
|
|
T | Get< T > (string key, Func< T > method) |
| Attempts to retrieve an item from cache. If not found in cache, will make callback to obtain the item from the caller which will be stored for later use More...
|
|
Task< T > | GetAsync< T > (string key, Func< Task< T >> method) |
| Attempts to retrieve an item from cache. If not found in cache, will make callback to obtain the item from the caller which will be stored for later use More...
|
|
void | Remove (string key) |
| Removes the given object from cache More...
|
|
Task< Exception > | RemoveAsync (string key) |
| Removes the given object from cache More...
|
|
Accessing cache (no cache actually used)
◆ Get< T >() [1/2]
T Sphyrnidae.Common.Cache.CacheNone.Get< T > |
( |
string |
key, |
|
|
Func< T > |
method |
|
) |
| |
Attempts to retrieve an item from cache. If not found in cache, will make callback to obtain the item from the caller which will be stored for later use
- Template Parameters
-
- Parameters
-
key | Name of the item in cache |
method | The callback function returning the item if not initially found in cache |
- Returns
- The object from cache/callback function
Implements Sphyrnidae.Common.Cache.ICache.
◆ Get< T >() [2/2]
bool Sphyrnidae.Common.Cache.CacheNone.Get< T > |
( |
string |
key, |
|
|
out T |
item |
|
) |
| |
Retrieves an item from the Cache
- Template Parameters
-
- Parameters
-
key | Name of the item in cache |
item | If the object is not found in the Cache, this will be populated |
- Returns
- True if the object was found, False if not found
Implements Sphyrnidae.Common.Cache.ICache.
◆ GetAsync< T >()
Task<T> Sphyrnidae.Common.Cache.CacheNone.GetAsync< T > |
( |
string |
key, |
|
|
Func< Task< T >> |
method |
|
) |
| |
Attempts to retrieve an item from cache. If not found in cache, will make callback to obtain the item from the caller which will be stored for later use
- Template Parameters
-
- Parameters
-
key | Name of the item in cache |
method | The callback function returning the item if not initially found in cache |
- Returns
- The object from cache/callback function
Implements Sphyrnidae.Common.Cache.ICache.
◆ Remove()
void Sphyrnidae.Common.Cache.CacheNone.Remove |
( |
string |
key | ) |
|
Removes the given object from cache
Note that this removes from local cache, distributed cache, and via SignalR, all other local cache as well. Any errors in removal of the item will be hidden from the user, so it is preferred to use RemoveAsync if you need this exception handling.
- Parameters
-
key | Name of the item in cache |
Implements Sphyrnidae.Common.Cache.ICache.
◆ RemoveAsync()
Task<Exception> Sphyrnidae.Common.Cache.CacheNone.RemoveAsync |
( |
string |
key | ) |
|
Removes the given object from cache
Note that this removes from local cache, distributed cache, and via SignalR, all other local cache as well
- Parameters
-
key | Name of the item in cache |
- Returns
- If an exception was thrown and the item was not fully removed, this exception will be returned. If everything succeeded, this will be null.
Implements Sphyrnidae.Common.Cache.ICache.
◆ Set< T >()
void Sphyrnidae.Common.Cache.CacheNone.Set< T > |
( |
string |
key, |
|
|
T |
item |
|
) |
| |
Sets an item into cache
- Template Parameters
-
- Parameters
-
key | Name of the item in cache |
item | The item being set into cache |
Implements Sphyrnidae.Common.Cache.ICache.
◆ Options
The documentation for this class was generated from the following file:
- C:/Users/dougb/Desktop/Sphyrnidae/New/Common/Common/Cache/CacheNone.cs