Skip to main content

Phzyx versioned resource cache (memory / Redis). Docs: https://phzyx.xyz/forge/cache

Project description

Phzyx Cache

Versioned resource cache (memory / Redis) for list-style read paths.

uv add 'phzyx-forge[cache]'
# or
uv add phzyx-cache
uv add 'phzyx-cache[redis]'   # Redis backend

Full docs on the website

Cache guide https://phzyx.xyz/forge/cache
Forge docs https://phzyx.xyz/forge
Getting started https://phzyx.xyz/forge/getting-started
Product home https://phzyx.xyz
Source https://github.com/phzyxyz/forge

After install → phzyx.xyz/forge/cache.


API (0.1)

from phzyx.cache import MemoryCache, RedisCache, ResourceCache

cache = ResourceCache(MemoryCache(), ttl=60)
cache.set_list("users", [{"id": 1, "email": "a@example.com"}])
rows = cache.get_list("users")       # list[dict] | None
cache.invalidate("users")            # bump version → lists miss
Class Role
MemoryCache In-process string cache + optional TTL
RedisCache Same API via Redis
ResourceCache Versioned lists: phzyx:res:{name}:v{N}:list:{suffix}

You invalidate on write. Not a SQL query cache. MemoryCache is per process.


Related

License

MIT · phzyx.xyz

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phzyx_cache-0.1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phzyx_cache-0.1.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file phzyx_cache-0.1.1.tar.gz.

File metadata

  • Download URL: phzyx_cache-0.1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for phzyx_cache-0.1.1.tar.gz
Algorithm Hash digest
SHA256 397fe4d9f2a1abed5f682ff2c66b245047efbf6892c787e26c192a5410437c21
MD5 d11d372869a8358b7d0022b151feba66
BLAKE2b-256 c5ae89fa0748b157d1b7ec5186e0893b90148bb5d519f1986b8fbce9f2ef914a

See more details on using hashes here.

Provenance

The following attestation bundles were made for phzyx_cache-0.1.1.tar.gz:

Publisher: publish.yml on phzyxyz/forge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file phzyx_cache-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: phzyx_cache-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for phzyx_cache-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f4144ab41a713939a0428548afb299769b3a44c95e9d7fa4784e4b498925a7e8
MD5 55ffb06f314b1412a618381b1ba0db2a
BLAKE2b-256 d391a910d13023885308aa4951cad18a9be7bd4b76b4cb4473d4659a5c3d31b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for phzyx_cache-0.1.1-py3-none-any.whl:

Publisher: publish.yml on phzyxyz/forge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page