mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 18:22:23 +08:00
17 lines
541 B
C#
17 lines
541 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace SqlSugar
|
|
{
|
|
public interface ICacheManager<V>
|
|
{
|
|
V this[string key] { get; }
|
|
void Add(string key, V value);
|
|
void Add(string key, V value, int cacheDurationInSeconds);
|
|
bool ContainsKey(string key);
|
|
V Get(string key);
|
|
IEnumerable<string> GetAllKey();
|
|
void Remove(string key);
|
|
V GetOrCreate(string cacheKey, Func<ICacheManager<V>, string, V> successAction, Func<ICacheManager<V>, string, V> errorAction);
|
|
}
|
|
} |