GetAgent perInstanceCache

This commit is contained in:
Haiping Chen 2024-03-26 19:26:11 -05:00
parent 747eb2dc2c
commit ac6ad99975

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)
{