prompt-cache-control Claude Code mod
Displays cache usage and an estimated expiry countdown.
- session.start
- session.end
- turn.step
- command.run
- ui.close
- ui.press
- ui.render
Install commands
Installation not verified
Review the author’s instructions and source before installing.
Open source repository ↗Review the source before installing. Installation guide →
Source & updates
- Last updated
- 2026-10-08
- License
- MIT
- Plugin version
- 0.1.0
- Claude Code
- 2.1.287+
- Source
8da17d6- Repository stars
- 32,476 · Repository contains 18 mods in this directory
A usage estimate is not a billing statement.
Source files
Source inventory
Declared events: session.start | session.end | turn.step | command.run{command=cache} | ui.close | ui.press | ui.render{component=AbovePrompt} | ui.render{component=Pane}
Declared API calls: $.clock.every | $.command.register | $.env.get | $.fs.read (via readSetting) | $.session.cwd (via readSetting) | $.session.usage | $.ui.close | $.ui.invalidate | $.ui.log | $.ui.open | $.ui.resolve | $.ui.status | $.ui.toast
Can read files evidence
const value = JSON.parse(await $.fs.read(file)).promptCacheTtlCan read environment variables evidence
const home = await $.env.get('HOME').catch(() => undefined)enable1h: await $.env.get('ENABLE_PROMPT_CACHING_1H').catch(none),force5m: await $.env.get('FORCE_PROMPT_CACHING_5M').catch(none),ttlVar: await $.env.get('CLAUDE_CODE_PROMPT_CACHE_TTL').catch(none),disableAll: await $.env.get('DISABLE_PROMPT_CACHING').catch(none),disableHaiku: await $.env.get('DISABLE_PROMPT_CACHING_HAIKU').catch(none),disableSonnet: await $.env.get('DISABLE_PROMPT_CACHING_SONNET').catch(none),disableOpus: await $.env.get('DISABLE_PROMPT_CACHING_OPUS').catch(none),Review methodology · Source and updates · Runtime limits · Function hooks guide