firm-cache
Database-backed caching for Python — a pure-Python port of Rails' Solid Cache. No Redis required: cache entries live in your existing SQLite, PostgreSQL, or MySQL/MariaDB database.
Part of firm, a port of the Rails 8 Solid stack.
pip install firm-cache
pip install "firm-cache[encryption]" # with at-rest encryption
Quickstart
from firm.cache import Cache
cache = Cache(database_url="postgresql://localhost/myapp")
cache.set("greeting", "hello")
cache.get("greeting") # "hello"
cache.fetch("expensive", lambda: compute()) # compute once, then cached
Highlights
- FIFO eviction by age, total size, or entry count — tuned in the background, like Solid Cache
- Cache anything you can serialize — JSON by default; raw
bytes(thumbnails, protobuf, compressed blobs) and ~⅓ smaller rows withfirm-cache[msgpack]; arbitrary Python objects with the opt-in pickle coder - At-rest encryption (Fernet) via
firm-cache[encryption] fetch,get_multi/set_multi,increment/decrement
Docs
MIT licensed. Schema and design derived from Solid Cache (© 37signals, MIT); see NOTICE.
Metadata
Release files for firm-cache 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| firm_cache-1.1.0.tar.gz | 16.3 kB | Without provenance | Details for firm_cache-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| firm_cache-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for firm_cache-1.1.0-py3-none-any.whl |
Total release size: 38.2 kB
Release files / firm_cache-1.1.0.tar.gz
| Download URL | firm_cache-1.1.0.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3411c46498049574946aa209984b9cf55cd4df38b054b4504f82c022a796f03
|
|
BLAKE2b-256 checksum How to use checksums |
dcb5c2843e4c999f72a13419acbc58b849658897fb59fc556e1bf3e81e5c58fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / firm_cache-1.1.0-py3-none-any.whl
| Download URL | firm_cache-1.1.0-py3-none-any.whl |
|---|---|
| Size | 21.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a78f5bd860c2eb1237b498bb68111660bcebce6c2d2669d7d3f1846c0e5ac9cc
|
|
BLAKE2b-256 checksum How to use checksums |
e958019ab79f645582ce758bcabead2b6c32d7d57586af180c026d40ddf7faa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for firm-cache 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.