MCPcopy Create free account
hub / github.com/BitterSecurity/Decepticon / _cap_cache_control

Function _cap_cache_control

config/claude_code_handler.py:357–363  ·  view source on GitHub ↗
(system_blocks: list[dict[str, Any]], max_blocks: int = 4)

Source from the content-addressed store, hash-verified

355
356
357def _cap_cache_control(system_blocks: list[dict[str, Any]], max_blocks: int = 4) -> None:
358 if len(system_blocks) <= max_blocks:
359 return
360 keep_indices = {0} | set(range(len(system_blocks) - (max_blocks - 1), len(system_blocks)))
361 for i, block in enumerate(system_blocks):
362 if i not in keep_indices and "cache_control" in block:
363 del block["cache_control"]
364
365
366def _add_conversation_cache_control(

Calls

no outgoing calls