mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-03 04:13:48 +08:00
Add and delete level-1 cache fuzzy query based on key
This commit is contained in:
parent
df352b8b6b
commit
fd368ffa36
@ -1048,6 +1048,16 @@ namespace SqlSugar
|
||||
{
|
||||
ReflectionInoCore<T>.GetInstance().Remove(key);
|
||||
}
|
||||
public void RemoveCacheByLikeKey<T>(string key)
|
||||
{
|
||||
foreach (var item in ReflectionInoCore<T>.GetInstance().GetAllKey())
|
||||
{
|
||||
if (item!=null&&key!=null&&item.Contains(key))
|
||||
{
|
||||
ReflectionInoCore<T>.GetInstance().Remove(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Page Each
|
||||
|
@ -42,6 +42,7 @@ namespace SqlSugar
|
||||
ICacheService GetReflectionInoCacheInstance();
|
||||
void RemoveCacheAll();
|
||||
void RemoveCacheAll<T>();
|
||||
void RemoveCacheByLikeKey<T>(string key);
|
||||
void RemoveCache<T>(string key);
|
||||
void PageEach<T>(IEnumerable<T> pageItems, int pageSize, Action<List<T>> action);
|
||||
Task PageEachAsync<T>(IEnumerable<T> pageItems, int pageSize, Func<List<T>, Task> action);
|
||||
|
Loading…
Reference in New Issue
Block a user