---
title: "cache-timer"
url: "https://claudemods.dev/ko/builds/cache-timer-36cdda"
source: "https://github.com/ildunari/kosta-plugins/tree/main/plugins/cache-timer"
source_type: "github"
repo: "https://github.com/ildunari/kosta-plugins/tree/main/plugins/cache-timer"
author: "ildunari"
author_handle: "ildunari"
stars: 0
category: "워크플로 및 CI"
categories: ["workflow"]
tags: ["auto-compact", "claude-code", "context-management", "hooks", "plugin", "prompt-cache", "statusline"]
permission_level: 0
scan_complete: true
install: "claude plugin marketplace add ildunari/kosta-plugins\nclaude plugin install cache-timer@kosta-plugins"
added: "2026-10-05T20:13:22.766Z"
updated: "2026-10-10T04:05:50Z"
locale: "ko"
content_locale: "ko"
---

# cache-timer

주 대화의 프롬프트 캐시 창을 추적하는 Claude Code mod(function-hook 플러그인)입니다.

## Description

# cache-timer

주 대화의 프롬프트 캐시 창을 추적하는 Claude Code mod(function-hook 플러그인)입니다.

- **상태 줄:** 모델 이름 옆에 `🟢 ▰▰▰▰▰▰▰▰▱▱ 47:12`를 표시합니다. 창의 절반을 넘으면 🟢, 15%까지 내려가면 🟡, 그 아래에서는 🔴, 만료되면 ⚪ `cold`가 됩니다. 주 스레드 요청이 전송된 시점부터 창이 다시 시작되고 모델이 응답하면 끝납니다(중단된 응답도 포함). 서브에이전트와 압축 요청은 자체 캐시 접두사를 사용하므로 무시됩니다.
- **경고:** 12분이 남으면 무언가를 보내지 않는 한 2분 후 자동 압축이 실행된다는 토스트를 표시합니다. 컨텍스트가 너무 작아 압축할 수 없거나, 절전 후 시계가 이미 10분 지점을 지나간 경우에는 건너뜁니다.
- **자동 압축, 1회:** 10분이 남았을 때 캐시가 아직 유효하면 `/compact`와 같은 압축을 실행합니다. 각 캐시 세대(요청 시각으로 이름 지정)는 한 번만 실행할 수 있습니다. 호출 전에 기회가 소모되고, 건너뛰거나 턴 중간에 거부되어도 소모됩니다. 모델에 도달하는 새 요청만 새 기회로 새 세대를 시작합니다. 40k 토큰 미만의 컨텍스트는 건너뛰며, 준비 중 요청이 캐시를 다시 데운 경우 압축 호출을 끕니다. 📦는 실제로 압축이 실행된 세대를 표시합니다.

창의 TTL은 1시간(`TTL_MS`)이라고 가정합니다. 5분 TTL을 사용하는 세션(사용량 초과, 일부 API key 설정)에서는 카운트다운이 잘못 표시됩니다. 임계값은 `hooks/register.tsx` 맨 위의 상수입니다.

설치: `claude plugin install cache-timer@kosta-plugins`. 확인: `claude plugin validate plugins/cache-timer`.

## Install

```
claude plugin marketplace add ildunari/kosta-plugins
claude plugin install cache-timer@kosta-plugins
```

## Original README

# cache-timer

A Claude Code mod (function-hook plugin) that tracks the prompt-cache window of the main conversation.

- **Status line:** `🟢 ▰▰▰▰▰▰▰▰▱▱ 47:12` beside the model name. The dot goes 🟢 above half the window, 🟡 down to 15%, 🔴 below, ⚪ `cold` once it has expired. The window restarts from when a main-thread request is sent, once the model has answered it (an interrupted answer counts); subagent and compaction requests run on their own cache prefix and are ignored.
- **Warning:** at 12 minutes left, a toast says an auto-compact is coming in 2 minutes unless you send something. It's skipped when the context is too small to compact, or when the clock has already jumped past the 10-minute mark (after a sleep).
- **Auto-compact, once:** at 10 minutes left, while the cache is still warm, it runs the same compaction as `/compact`. Each cache generation (named by its request time) gets one shot: it's spent before the call, a skip or a mid-turn refusal leaves it spent, and only a new request that reaches the model starts a generation with a fresh shot. It skips contexts under 40k tokens and calls the compaction off if a request re-warmed the cache while it was getting ready. 📦 marks a generation where a compaction actually stood.

The window is assumed to be the 1-hour TTL (`TTL_MS`). Sessions on the 5-minute TTL (usage overage, some API-key setups) will see the wrong countdown. The thresholds are constants at the top of `hooks/register.tsx`.

Install: `claude plugin install cache-timer@kosta-plugins`. Check: `claude plugin validate plugins/cache-timer`.
