Add SEP-2549 caching hints (ttlMs and cacheScope) to cacheable results (#1623)
Co-authored-by: Tarek Mahmoud Sayed <tarekms@ntdev.microsoft.com>
This commit is contained in:
parent
dbb7a20176
commit
c021d0a4f8
1 changed files with 1193 additions and 147 deletions
|
|
@ -18,11 +18,21 @@ namespace ModelContextProtocol.Protocol;
|
|||
/// See the <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">schema</see> for details.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public sealed class ListPromptsResult : PaginatedResult
|
||||
public sealed class ListPromptsResult : PaginatedResult, ICacheableResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets a list of prompts or prompt templates that the server offers.
|
||||
/// </summary>
|
||||
[JsonPropertyName("prompts")]
|
||||
public IList<Prompt> Prompts { get; set; } = [];
|
||||
|
||||
/// <inheritdoc />
|
||||
[JsonPropertyName("ttlMs")]
|
||||
[JsonConverter(typeof(TimeSpanMillisecondsConverter))]
|
||||
public TimeSpan? TimeToLive { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
[JsonPropertyName("cacheScope")]
|
||||
[JsonConverter(typeof(CacheScopeConverter))]
|
||||
public CacheScope? CacheScope { get; set; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue