diff --git a/Bootstrap.DataAccess/CacheCleanUtility.cs b/Bootstrap.DataAccess/CacheCleanUtility.cs
index e496d2f4..14ae66ce 100644
--- a/Bootstrap.DataAccess/CacheCleanUtility.cs
+++ b/Bootstrap.DataAccess/CacheCleanUtility.cs
@@ -8,7 +8,7 @@ namespace Bootstrap.DataAccess
{
internal static class CacheCleanUtility
{
- const string RetrieveAllRolesDataKey = "BootstrapAdminRoleMiddleware-RetrieveRoles";
+ private const string RetrieveAllRolesDataKey = "BootstrapAdminRoleMiddleware-RetrieveRoles";
///
///
///
@@ -17,10 +17,8 @@ namespace Bootstrap.DataAccess
///
///
///
- ///
- ///
- ///
- internal static void ClearCache(string roleIds = null, string userIds = null, string groupIds = null, string menuIds = null, string dictIds = null, string logIds = null, string notifyIds = null, string exceptionIds = null, string cacheKey = null)
+ ///
+ internal static void ClearCache(string roleIds = null, string userIds = null, string groupIds = null, string menuIds = null, string dictIds = null, string cacheKey = null)
{
var cacheKeys = new List();
var corsKeys = new List();
@@ -75,20 +73,9 @@ namespace Bootstrap.DataAccess
if (dictIds != null)
{
cacheKeys.Add(BootstrapDict.RetrieveDictsDataKey + "*");
+ cacheKeys.Add(DictHelper.RetrieveCategoryDataKey);
corsKeys.Add(BootstrapDict.RetrieveDictsDataKey + "*");
}
- if (logIds != null)
- {
- cacheKeys.Add(LogHelper.RetrieveLogsDataKey + "*");
- }
- if (notifyIds != null)
- {
- cacheKeys.Add(NotificationHelper.RetrieveNotificationsDataKey + "*");
- }
- if (exceptionIds != null)
- {
- cacheKeys.Add(ExceptionHelper.RetrieveExceptionsDataKey + "*");
- }
if (cacheKey != null)
{
cacheKeys.Add(cacheKey);
diff --git a/Bootstrap.DataAccess/DictHelper.cs b/Bootstrap.DataAccess/DictHelper.cs
index 89e2764a..51f43eec 100644
--- a/Bootstrap.DataAccess/DictHelper.cs
+++ b/Bootstrap.DataAccess/DictHelper.cs
@@ -17,7 +17,7 @@ namespace Bootstrap.DataAccess
///
///
///
- private const string RetrieveCategoryDataKey = "DictHelper-RetrieveDictsCategory";
+ internal const string RetrieveCategoryDataKey = "DictHelper-RetrieveDictsCategory";
///
///
///
diff --git a/Bootstrap.DataAccess/ExceptionHelper.cs b/Bootstrap.DataAccess/ExceptionHelper.cs
index 72e54c10..30ed2dbb 100644
--- a/Bootstrap.DataAccess/ExceptionHelper.cs
+++ b/Bootstrap.DataAccess/ExceptionHelper.cs
@@ -20,7 +20,7 @@ namespace Bootstrap.DataAccess
///
///
///
- public static readonly string RetrieveExceptionsDataKey = "ExceptionHelper-RetrieveExceptions";
+ private static readonly string RetrieveExceptionsDataKey = "ExceptionHelper-RetrieveExceptions";
///
///
///
diff --git a/Bootstrap.DataAccess/LogHelper.cs b/Bootstrap.DataAccess/LogHelper.cs
index 9afd1007..d46bcd5f 100644
--- a/Bootstrap.DataAccess/LogHelper.cs
+++ b/Bootstrap.DataAccess/LogHelper.cs
@@ -10,7 +10,7 @@ namespace Bootstrap.DataAccess
{
public static class LogHelper
{
- internal const string RetrieveLogsDataKey = "LogHelper-RetrieveLogs";
+ private const string RetrieveLogsDataKey = "LogHelper-RetrieveLogs";
///
/// 查询所有日志信息
///
@@ -76,7 +76,7 @@ namespace Bootstrap.DataAccess
cmd.Parameters.Add(DBAccessManager.SqlDBAccess.CreateParameter("@RequestUrl", p.RequestUrl));
ret = DBAccessManager.SqlDBAccess.ExecuteNonQuery(cmd) == 1;
}
- CacheCleanUtility.ClearCache(logIds: p.Id == 0 ? string.Empty : p.Id.ToString());
+ CacheManager.Clear(RetrieveLogsDataKey);
DeleteLogAsync();
return ret;
}
diff --git a/Bootstrap.DataAccess/NotificationHelper.cs b/Bootstrap.DataAccess/NotificationHelper.cs
index 62e47b0a..d5129fed 100644
--- a/Bootstrap.DataAccess/NotificationHelper.cs
+++ b/Bootstrap.DataAccess/NotificationHelper.cs
@@ -15,7 +15,6 @@ namespace Bootstrap.DataAccess
///
///
///
- internal const string RetrieveNotificationsDataKey = "NotificationHelper-RetrieveNotifications";
private const string PullNotificationsIntervalDataKey = "NotificationHelper-PullNotificationsInterval";
private static readonly List MessagePool = new List();
///