Skip to main content

Module price_cache

Module price_cache 

Source
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_CACHE if set, else <data_dir>/btctax/price_cache.csv (dirs::data_dir()), else None (no platform data dir ⇒ bundled-only — still fully functional, just no cache overlay).