Class McpCacheHint
java.lang.Object
org.apache.juneau.rest.server.mcp.v20260728.McpCacheHint
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe cache scope.getTtlMs()The cache TTL in milliseconds.setCacheScope(McpCacheScope value) Sets the cache scope.Sets the cache TTL in milliseconds.
-
Constructor Details
-
McpCacheHint
public McpCacheHint()
-
-
Method Details
-
getTtlMs
The cache TTL in milliseconds.- Returns:
- The TTL, or
nullif no TTL hint is configured.
-
setTtlMs
Sets the cache TTL in milliseconds.- Parameters:
value- The new value. Can benullto unset the property. Must not be negative.- Returns:
- This object.
- Throws:
IllegalArgumentException- Ifvalueis negative.
-
getCacheScope
The cache scope.- Returns:
- The scope, or
nullif not set (public-by-absence).
-
setCacheScope
Sets the cache scope.- Parameters:
value- The new value. Can benullto unset the property (public-by-absence).- Returns:
- This object.
-