configure Redis cache and distributed locks
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using Elsa.Caching.Models;
|
||||
|
||||
namespace Elsa.Caching;
|
||||
|
||||
/// <summary>Storage for cache entries. Implementations must distinguish a miss from a cached null.</summary>
|
||||
public interface ICacheProvider
|
||||
{
|
||||
bool IsShared { get; }
|
||||
Task<CacheResult<T>> GetAsync<T>(string key, CancellationToken cancellationToken = default);
|
||||
Task SetAsync<T>(string key, T? value, CacheEntryOptions options, CancellationToken cancellationToken = default);
|
||||
Task RemoveAsync(string key, CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
public record CacheResult<T>(bool Found, T? Value);
|
||||
Reference in New Issue
Block a user