From f16797adb5862d9aad5edbcba7a48dee56bb8d07 Mon Sep 17 00:00:00 2001 From: jianweie code Date: Mon, 15 Jan 2024 22:24:43 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=86=85=E5=AD=98=E7=BC=93=E5=AD=98=E3=80=90=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=89=80=E6=9C=89=E7=BC=93=E5=AD=98=E9=94=AE=E3=80=91?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=96=B9=E6=B3=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CoreCms.Net.Caching/SqlSugar/SqlSugarMemoryCache.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CoreCms.Net.Caching/SqlSugar/SqlSugarMemoryCache.cs b/CoreCms.Net.Caching/SqlSugar/SqlSugarMemoryCache.cs index 1c5e4b80..46177b94 100644 --- a/CoreCms.Net.Caching/SqlSugar/SqlSugarMemoryCache.cs +++ b/CoreCms.Net.Caching/SqlSugar/SqlSugarMemoryCache.cs @@ -268,7 +268,10 @@ namespace CoreCms.Net.Caching.SqlSugar public List GetCacheKeys() { const BindingFlags flags = BindingFlags.Instance | BindingFlags.NonPublic; - var entries = Cache.GetType().GetField("_entries", flags).GetValue(Cache); + + var coherentState = Cache.GetType().GetField("_coherentState", flags).GetValue(Cache); + var entries = coherentState.GetType().GetField("_entries", flags).GetValue(coherentState); + var cacheItems = entries as IDictionary; var keys = new List(); if (cacheItems == null) return keys;