https://www.boundaryml.com logo
🟡 Triggering Prefix Caching with Ephemeral Contro...
# questions
s
Hey, is this the right way to trigger prefix caching?
{{ _.role("user", cache_control={ "type": "ephemeral" }) }}
v
Yep!
You also need to add it to your client definition tho
Since not every model supports it
s
...
That has the full docs
Reason for this is because you might have a fallback that goes to OpenAI and anthropic and you wanna be able to use the same prompt for both of them but not have to worry about sending invalid http request