> ## Documentation Index
> Fetch the complete documentation index at: https://notewise.click/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Cache, logs, history, and stats

> Inspect NoteWise run history, cache records, stats, and session logs.

NoteWise stores persistent state under `<state>`, where `<state>` is `NOTEWISE_HOME` or `~/.notewise`.

## Cache

The cache database is `<state>/.notewise_cache.db`. SQLite sidecars may include `.notewise_cache.db-wal` and `.notewise_cache.db-shm`.

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
notewise cache
notewise cache info
notewise cache show VIDEO_ID
notewise cache prune --older-than 30
notewise cache clear --yes
```

<Warning>
  `cache clear` deletes the local SQLite DB and sidecars. It does not delete
  generated notes, quizzes, transcripts, HTML, PDF, or DOCX output files.
</Warning>

## History and stats

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
notewise history
notewise stats
notewise stats --model gemini/gemini-2.5-flash
```

`history` shows recent cached videos and run details. `stats` summarizes totals, tokens, costs, and model breakdowns from the cache database.

## Logs

Logs live under `<state>/logs` and use filenames like `notewise-YYYY-MM-DD_HH-MM-SS.log`.

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
notewise logs
notewise logs --tail 100
notewise logs --open
notewise logs clean --older-than 7
notewise logs clean --all
```

Logs are structlog key-value logs, not JSON. They should not include raw prompts, provider payloads, OAuth tokens, API keys, or cookies.
