diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/SharpCacheAttribute.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/SharpCacheAttribute.cs index e788fc0c..957ff241 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/SharpCacheAttribute.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/SharpCacheAttribute.cs @@ -43,7 +43,7 @@ public class SharpCacheAttribute : MoAttribute private string GetCacheKey(MethodContext context) { - var key = _prefix; + var key = _prefix + "-" + context.Method.Name; foreach (var arg in context.Arguments) { if (arg is null) diff --git a/src/Infrastructure/BotSharp.Abstraction/Utilities/Pagination.cs b/src/Infrastructure/BotSharp.Abstraction/Utilities/Pagination.cs index bb5d74e4..8d6d0e0d 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Utilities/Pagination.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Utilities/Pagination.cs @@ -43,7 +43,7 @@ public class Pagination : ICacheKey public bool ReturnTotal { get; set; } = true; public string GetCacheKey() - => $"{_page}_{_size}_{Sort}_{Order}"; + => $"{nameof(Pagination)}_{_page}_{_size}_{Sort}_{Order}"; } public class PagedItems