Class AnthropicCacheOptions

java.lang.Object
org.springframework.ai.anthropic.AnthropicCacheOptions

public class AnthropicCacheOptions extends Object
Anthropic cache options for configuring prompt caching behavior with the Anthropic Java SDK.
Since:
1.1.0
Author:
Austin Dase, Soby Chacko
  • Constructor Details

    • AnthropicCacheOptions

      public AnthropicCacheOptions()
  • Method Details

    • disabled

      public static AnthropicCacheOptions disabled()
      Returns a new disabled cache options instance with strategy NONE. Each call returns a fresh instance to avoid shared mutable state.
    • builder

      public static AnthropicCacheOptions.Builder builder()
    • getStrategy

      public AnthropicCacheStrategy getStrategy()
    • setStrategy

      public void setStrategy(AnthropicCacheStrategy strategy)
    • getContentLengthFunction

      public Function<@Nullable String, Integer> getContentLengthFunction()
    • setContentLengthFunction

      public void setContentLengthFunction(Function<@Nullable String, Integer> contentLengthFunction)
    • getMessageTypeTtl

      public Map<org.springframework.ai.chat.messages.MessageType, AnthropicCacheTtl> getMessageTypeTtl()
    • setMessageTypeTtl

      public void setMessageTypeTtl(Map<org.springframework.ai.chat.messages.MessageType, AnthropicCacheTtl> messageTypeTtl)
    • getMessageTypeMinContentLengths

      public Map<org.springframework.ai.chat.messages.MessageType, Integer> getMessageTypeMinContentLengths()
    • setMessageTypeMinContentLengths

      public void setMessageTypeMinContentLengths(Map<org.springframework.ai.chat.messages.MessageType, Integer> messageTypeMinContentLengths)
    • isMultiBlockSystemCaching

      public boolean isMultiBlockSystemCaching()
    • setMultiBlockSystemCaching

      public void setMultiBlockSystemCaching(boolean multiBlockSystemCaching)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object