disable cache in local
This commit is contained in:
parent
4b6c32586c
commit
18e318b2a3
|
|
@ -16,7 +16,9 @@ public partial class AgentService
|
|||
return query.ToList();
|
||||
}
|
||||
|
||||
#if !DEBUG
|
||||
[MemoryCache(10 * 60)]
|
||||
#endif
|
||||
public async Task<Agent> GetAgent(string id)
|
||||
{
|
||||
var db = _services.GetRequiredService<IBotSharpRepository>();
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ public class RouteToAgentFn : IFunctionCallback
|
|||
{
|
||||
// Add field to args
|
||||
message.FunctionArgs = AppendPropertyToArgs(message.FunctionArgs, "missing_fields", missingFields);
|
||||
message.ExecutionResult = $"missing some information";
|
||||
message.ExecutionResult = $"missing some information: [{string.Join(',', missingFields)}]";
|
||||
|
||||
// Handle redirect
|
||||
if (!string.IsNullOrEmpty(routingRule.RedirectTo))
|
||||
|
|
@ -107,6 +107,11 @@ public class RouteToAgentFn : IFunctionCallback
|
|||
// Add redirected agent
|
||||
message.FunctionArgs = AppendPropertyToArgs(message.FunctionArgs, "redirect_to", agent.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
// back to router
|
||||
agentId = message.CurrentAgentId;
|
||||
}
|
||||
}
|
||||
|
||||
return missingFields.Any();
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ public class Router : IAgentRouting
|
|||
return await agentService.LoadAgent(AgentId);
|
||||
}
|
||||
|
||||
#if !DEBUG
|
||||
[MemoryCache(10 * 60)]
|
||||
#endif
|
||||
public RoutingItem[] GetRoutingRecords()
|
||||
{
|
||||
var db = _services.GetRequiredService<IBotSharpRepository>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue