Reset page after crawling.
This commit is contained in:
parent
7527f783d8
commit
8bbe78e7f5
|
|
@ -1,6 +1,8 @@
|
|||
using BotSharp.Abstraction.Infrastructures;
|
||||
|
||||
namespace BotSharp.Abstraction.Browsing.Models;
|
||||
|
||||
public class MessageInfo
|
||||
public class MessageInfo : ICacheKey
|
||||
{
|
||||
public string AgentId { get; set; } = null!;
|
||||
public string UserId { get; set; } = null!;
|
||||
|
|
@ -8,4 +10,7 @@ public class MessageInfo
|
|||
public string? MessageId { get; set; }
|
||||
public string? TaskId { get; set; }
|
||||
public string StepId { get; set; } = Guid.NewGuid().ToString();
|
||||
|
||||
public string GetCacheKey()
|
||||
=> $"{nameof(MessageInfo)}-{AgentId}-{UserId}-{ContextId}-{MessageId}-{TaskId}-{StepId}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,9 +16,6 @@ public class CacheService : ICacheService
|
|||
|
||||
public async Task<T?> GetAsync<T>(string key)
|
||||
{
|
||||
#if DEBUG
|
||||
return default;
|
||||
#endif
|
||||
if (string.IsNullOrEmpty(_settings.Redis))
|
||||
{
|
||||
return default;
|
||||
|
|
@ -42,9 +39,6 @@ public class CacheService : ICacheService
|
|||
|
||||
public async Task<object> GetAsync(string key, Type type)
|
||||
{
|
||||
#if DEBUG
|
||||
return default;
|
||||
#endif
|
||||
if (string.IsNullOrEmpty(_settings.Redis))
|
||||
{
|
||||
return default;
|
||||
|
|
@ -69,9 +63,6 @@ public class CacheService : ICacheService
|
|||
|
||||
public async Task SetAsync<T>(string key, T value, TimeSpan? expiry)
|
||||
{
|
||||
#if DEBUG
|
||||
return;
|
||||
#endif
|
||||
if (string.IsNullOrEmpty(_settings.Redis))
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue