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 →

Permissions Facts

Can read files
Yes
Can write files
–
Can access the network
–
Can read environment variables
Yes
Can change prompts
–
Can intercept tool calls
–

Capability evidence is not a security certification; “–” does not mean a capability is absent.

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
Plugin manifest ↗Hooks configuration ↗Registered module ↗

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

prompt-cache-control:119 ↗

const value = JSON.parse(await $.fs.read(file)).promptCacheTtl

Can read environment variables evidence

prompt-cache-control:113 ↗

const home = await $.env.get('HOME').catch(() => undefined)

prompt-cache-control:144 ↗

enable1h: await $.env.get('ENABLE_PROMPT_CACHING_1H').catch(none),

prompt-cache-control:145 ↗

force5m: await $.env.get('FORCE_PROMPT_CACHING_5M').catch(none),

prompt-cache-control:146 ↗

ttlVar: await $.env.get('CLAUDE_CODE_PROMPT_CACHE_TTL').catch(none),

prompt-cache-control:147 ↗

disableAll: await $.env.get('DISABLE_PROMPT_CACHING').catch(none),

prompt-cache-control:148 ↗

disableHaiku: await $.env.get('DISABLE_PROMPT_CACHING_HAIKU').catch(none),

prompt-cache-control:149 ↗

disableSonnet: await $.env.get('DISABLE_PROMPT_CACHING_SONNET').catch(none),

prompt-cache-control:150 ↗

disableOpus: await $.env.get('DISABLE_PROMPT_CACHING_OPUS').catch(none),

Review methodology · Source and updates · Runtime limits · Function hooks guide