35 lines
1.4 KiB
Markdown
35 lines
1.4 KiB
Markdown
# `zfin cache`
|
|
|
|
Inspect or clear the local provider-data cache.
|
|
|
|
```
|
|
Usage: zfin cache <stats|clear>
|
|
```
|
|
|
|
| Subcommand | Does |
|
|
|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| `stats` | List every cached symbol with per-data-type size, age, and freshness state. Stale entries (past TTL) are flagged. Includes `cusip_tickers.srf` if present. |
|
|
| `clear` | Delete every file under the cache directory. No confirmation; the next provider call re-fetches everything. |
|
|
|
|
The cache directory is `$ZFIN_CACHE_DIR` if set, otherwise
|
|
`~/.cache/zfin`.
|
|
|
|
## Examples
|
|
|
|
```bash
|
|
zfin cache stats
|
|
zfin cache clear # wipe; everything re-fetches on next use
|
|
```
|
|
|
|
`clear` is safe -- it only removes cached copies of public market data.
|
|
Reach for it when you suspect corrupt cached data; routine staleness is
|
|
handled automatically by the `auto` refresh policy.
|
|
|
|
## See also
|
|
|
|
- [Caching and data freshness](../../explanation/caching.md) -- TTLs and the fetch model.
|
|
- [Offline use and refreshing data](../../guides/offline-and-refresh.md) -- the `--refresh-data` flag.
|
|
|
|
---
|
|
|
|
[CLI command reference](index.md)
|