Enum Class BedrockCachePointPlacement
- All Implemented Interfaces:
Serializable, Comparable<BedrockCachePointPlacement>, Constable
Enum representing where to place cache points in the conversation.
AWS Bedrock Caching Requirements:
- Minimum tokens: ~1,024 tokens required for caching to activate
- Cache TTL: 5-minute default, resets on each cache hit
- Supported models: Only Claude 3.x and Amazon Nova models
Note on BedrockSystemMessage: When using BedrockSystemMessage with
granular cache points, the AFTER_SYSTEM placement is ignored for
BedrockSystemMessage instances. Granular cache points defined within
BedrockSystemMessage take precedence. The AFTER_SYSTEM placement
only applies when the LAST system-type message is a core
SystemMessage.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCache point after system messages.Cache point after tool definitions.Cache point after first user message. -
Method Summary
Modifier and TypeMethodDescriptionstatic BedrockCachePointPlacementReturns the enum constant of this class with the specified name.static BedrockCachePointPlacement[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AFTER_SYSTEM
Cache point after system messages.Only applies when the LAST system-type message is a core
SystemMessage. Ignored when the last system message is aBedrockSystemMessage(which uses its own granular cache points). -
AFTER_USER_MESSAGE
Cache point after first user message. -
AFTER_TOOLS
Cache point after tool definitions.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-