ICacheService Performance optimization

This commit is contained in:
sunkaixuan
2023-10-06 15:45:12 +08:00
parent f7fe10a8df
commit ceb38b9b53
2 changed files with 6 additions and 0 deletions

View File

@@ -40,6 +40,11 @@ namespace SqlSugar
{
return;
}
if (StaticConfig.CacheRemoveByLikeStringFunc != null)
{
StaticConfig.CacheRemoveByLikeStringFunc(cacheService, likeString);
return;
}
var keys = cacheService.GetAllKey<string>();
if (keys.HasValue())
{

View File

@@ -30,5 +30,6 @@ namespace SqlSugar
public static Func<string,string> Check_FieldFunc;
public static Type DynamicExpressionParserType;
public static object DynamicExpressionParsingConfig;
public static Action<ICacheService, string> CacheRemoveByLikeStringFunc { get; set; }
}
}