pub fn apply_cache_control(
messages: &[Message],
settings: &CacheSettings,
) -> Vec<Message>Expand description
Apply cache control to strategic message positions.
Strategy (Anthropic/OpenAI best practices):
- System message (if present) - first message if role is System
- Last user message - enables caching of conversation context
Returns a new Vec with cache_control applied where appropriate.