cache

Inspect and manage RESERVE’s local data store.

The cache command provides tools for working with RESERVE’s local embedded database, populated via reserve fetch –store. This is an intentional data store, not a transparent cache — data persists until you explicitly clear it. The database is implemented as a key-value store, enabling efficient storage and retrieval of series data and metadata.


USAGE

reserve cache [command]

Available Commands:

clearDelete entries from the local store
compactRewrite the database file to reclaim freed disk space
statsShow row counts and sizes for each bucket

reserve cache [command] –help (for more details about a specific command)

CLEAR

Delete data from the local store.

Usage: reserve cache clear [flags]

# Clear all stored data
reserve cache clear --all

# Clear only observations
 reserve cache clear --bucket obs
 
# Clear only meta-data
reserve cache clear --bucket series_meta

COMPACT

Rewrite the database file to reclaim unused disk space.

Usage: reserve cache compact

# Compact database and show saved space and new size
reserve cache compact

STATS

Inspect the contents and size of the local store.

Usage: reserve cache stats

# Show rowcounts and database size
reserve cache stats

WORKFLOW

# Fetch and store data locally

reserve fetch series CPIAUCSL --store

# Inspect local store

reserve cache stats

# Use cached data in analysis

reserve obs get CPIAUCSL --from cache --format jsonl

# Clear stored data when needed

reserve cache clear --all


See Global Flags for additional global options available for this command.

No affiliation with the Federal Reserve Bank of St. Louis

Not endorsed nor supported by the FRED® API technical team

© 2026 Derick Schaefer