DistributedCacheExtensions.SetAutoJson<TValue> method (1 of 2)
namespace: Serenity assembly: Serenity.Net.Core
Sets a value in the cache as byte[], string, or using JSON serialization depending on type of TValue
public static void SetAutoJson<TValue>(this IDistributedCache cache, string key, TValue value)
where TValue : class
| parameter | description |
|---|---|
| cache | Cache |
| key | Key |
| value | Value |
See Also
- class TValue
- class DistributedCacheExtensions
DistributedCacheExtensions.SetAutoJson<TValue> method (2 of 2)
namespace: Serenity assembly: Serenity.Net.Core
Sets a value in the cache as byte[], string, or using JSON serialization depending on type of TValue
public static void SetAutoJson<TValue>(this IDistributedCache cache, string key, TValue value,
TimeSpan expiration)
where TValue : class
| parameter | description |
|---|---|
| cache | Cache |
| key | Key |
| value | Value |
| expiration | Expiration |
See Also
- class TValue
- class DistributedCacheExtensions