Class McpCacheHint

java.lang.Object
org.apache.juneau.rest.server.mcp.v20260728.McpCacheHint

public class McpCacheHint extends Object
A single ttlMs/cacheScope configuration pair applied to a v2 cacheable result.

Both fields are nullable. A null getTtlMs() means no TTL hint is emitted on the wire. A null getCacheScope() means the wire omits cacheScope entirely, which per SEP-2549 is equivalent to "public" (public-by-absence).

  • Constructor Details

  • Method Details

    • getTtlMs

      public Integer getTtlMs()
      The cache TTL in milliseconds.
      Returns:
      The TTL, or null if no TTL hint is configured.
    • setTtlMs

      public McpCacheHint setTtlMs(Integer value)
      Sets the cache TTL in milliseconds.
      Parameters:
      value - The new value. Can be null to unset the property. Must not be negative.
      Returns:
      This object.
      Throws:
      IllegalArgumentException - If value is negative.
    • getCacheScope

      The cache scope.
      Returns:
      The scope, or null if not set (public-by-absence).
    • setCacheScope

      Sets the cache scope.
      Parameters:
      value - The new value. Can be null to unset the property (public-by-absence).
      Returns:
      This object.