CLI¶
The firm-cache command operates a cache database. Pass the URL with --database-url or the
FIRM_CACHE_DATABASE_URL env var.
Commands¶
stats — entry count and estimated size¶
firm-cache stats --database-url postgresql://localhost/myapp
# entries: 1240
# estimated_size: 5012345 bytes
clear — delete every entry¶
trim — run one eviction pass¶
Evicts a batch according to the cache's max_age/max_size/max_entries limits and exits. Useful
as a cron job if you run with auto_expire=False.
Tip: set
FIRM_CACHE_DATABASE_URLin your environment to omit--database-url.