lampac/Shared/Engine/Hybrid/IHybridCache.cs
lampac-talks f843f04fd4 chore: initial commit 154.3
Signed-off-by: lampac-talks <lampac-talks@users.noreply.github.com>
2026-01-30 16:23:09 +03:00

20 lines
675 B
C#

using Shared.Models;
namespace Shared.Engine
{
public interface IHybridCache
{
bool TryGetValue<TItem>(string key, out TItem value, bool? inmemory = null);
HybridCacheEntry<TItem> Entry<TItem>(string key, bool? inmemory = null);
TItem Set<TItem>(string key, TItem value, DateTimeOffset absoluteExpiration, bool? inmemory = null);
TItem Set<TItem>(string key, TItem value, TimeSpan absoluteExpirationRelativeToNow, bool? inmemory = null);
public static IHybridCache Get(RequestModel requestInfo) => AppInit.conf.cache.type == "fdb"
? new HybridFileCache()
: new HybridCache(requestInfo);
}
}