Expand description
Resolve the local price-cache path (#41 Part C). dirs lives HERE (and in btctax-update-prices),
NOT in btctax-adapters [R0-M2/r2 M-A] — the adapter’s LayeredPrices takes an ALREADY-resolved
cache_path and stays a pure format/provider crate (no dirs, no network). The cache is a documented
LOCAL INPUT the offline projection layers OVER the bundled dataset; it is populated ONLY by the
separate btctax-update-prices binary, so btctax-cli itself carries NO network dependency.
Constants§
- PRICE_
CACHE_ ENV - The env var that overrides the default cache location (tests / reproducibility / custom data dirs).
- UPDATE_
PRICES_ HINT - The pointer surfaced next to a “no price for {date}” condition — a STRING only (no dep, no shell-out): the tax binaries never fetch; the user runs the separate updater explicitly.
Functions§
- default_
cache_ path - The default local price-cache path:
$BTCTAX_PRICE_CACHEif set, else<data_dir>/btctax/price_cache.csv(dirs::data_dir()), elseNone(no platform data dir ⇒ bundled-only — still fully functional, just no cache overlay).