configure Redis cache and distributed locks

This commit is contained in:
Behzad Alizadeh
2026-10-10 16:50:37 +03:30
parent 3f75fec42b
commit 2676bf6ffd
155 changed files with 1784 additions and 229 deletions
@@ -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);