Skip to main content

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

Metadata

Release files for phzyx-cache 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for phzyx-cache 0.1.3
File Size Uploaded
phzyx_cache-0.1.3.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for phzyx-cache 0.1.3
File Interpreter ABI Platform
phzyx_cache-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 7.3 kB

Release files / phzyx_cache-0.1.3.tar.gz

Download URL phzyx_cache-0.1.3.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d42dcf86d3a5c641d510d1f0fb72164bb8d6b04e3ff876f98facd8578eb939c8
BLAKE2b-256 checksum
How to use checksums
0ba09a19bf4a09bfb80a0b2c7d9b3721c6b1a7e5b9ff803877b2c01a13322664
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release files / phzyx_cache-0.1.3-py3-none-any.whl

Download URL phzyx_cache-0.1.3-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74ca5087f48c58c9b6a433e73936e3759575058193ccb1256a9738f5e795075d
BLAKE2b-256 checksum
How to use checksums
772685792a83bef494d4a3b707b68d8845315e6b4b927b6efd8890bd5d3ce38f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page