mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-21 02:58:05 +08:00
-
This commit is contained in:
@@ -11,7 +11,8 @@ namespace ExtensionsDemo
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
var myCache = new SqlSugar.Extensions.HttpRuntimeCache();
|
||||
ICacheService myCache = new SqlSugar.Extensions.HttpRuntimeCache();//ICacheService
|
||||
|
||||
SqlSugarClient db = new SqlSugarClient(
|
||||
new ConnectionConfig()
|
||||
{
|
||||
@@ -20,7 +21,7 @@ namespace ExtensionsDemo
|
||||
IsAutoCloseConnection = true,
|
||||
ConfigureExternalServices = new ConfigureExternalServices()
|
||||
{
|
||||
DataInfoCacheService = myCache
|
||||
DataInfoCacheService = myCache //Setting external cache service
|
||||
}
|
||||
});
|
||||
|
||||
@@ -35,6 +36,7 @@ namespace ExtensionsDemo
|
||||
JoinType.Left,s1.Id==s2.Id
|
||||
}).Select(s1 => s1).WithCache().ToList();
|
||||
|
||||
|
||||
Console.WriteLine("Cache Key Count:"+myCache.GetAllKey<string>().Count());
|
||||
foreach (var item in myCache.GetAllKey<string>())
|
||||
{
|
||||
|
Reference in New Issue
Block a user