// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.Extensions.Caching.Distributed;
namespace Microsoft.Teams.Apps.State;
///
/// Configuration options for turn state management.
///
public class TurnStateOptions
{
///
/// Gets or sets the cache entry options applied when saving state.
/// Defaults to a 1-hour sliding expiration.
///
public DistributedCacheEntryOptions CacheEntryOptions { get; set; } = new()
{
SlidingExpiration = TimeSpan.FromHours(1)
};
///
/// Gets or sets the prefix for cache keys.
/// Defaults to "ts". Change this to isolate state when multiple bots share the same cache.
/// Keys are formatted as {KeyPrefix}:conv:{conversationId} and {KeyPrefix}:user:{conversationId}:{userId}.
///
public string KeyPrefix { get; set; } = "ts";
}