Merge pull request #366 from hchen2020/master

GetAgent perInstanceCache
This commit is contained in:
C. Oceania 2024-03-26 19:27:08 -05:00 committed by GitHub
commit 22b82b9a69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,3 @@
using BotSharp.Abstraction.Agents.Models;
using BotSharp.Abstraction.Repositories.Filters;
using BotSharp.Abstraction.Routing.Settings;
namespace BotSharp.Core.Agents.Services;
@ -7,7 +5,7 @@ namespace BotSharp.Core.Agents.Services;
public partial class AgentService
{
#if !DEBUG
[MemoryCache(10 * 60)]
[MemoryCache(10 * 60, perInstanceCache: true)]
#endif
public async Task<PagedItems<Agent>> GetAgents(AgentFilter filter)
{
@ -29,7 +27,7 @@ public partial class AgentService
}
#if !DEBUG
[MemoryCache(10 * 60)]
[MemoryCache(10 * 60, perInstanceCache: true)]
#endif
public async Task<Agent> GetAgent(string id)
{