Skip to content

v0.1.0

Choose a tag to compare

@ashimov ashimov released this 16 May 08:14
· 4 commits to main since this release

Initial release.

  • init_cache(app, *, backend=...) — registers CachePlugin, mounts on app.state.cache.
  • @cache(ttl=..., tags=..., vary=..., key_func=..., condition=...) decorator.
  • MemoryCacheBackend(max_size=10_000) — LRU + TTL, default.
  • RedisCacheBackend.from_url(...) — multi-process via hawkapi-cache[redis] extra.
  • Tag-based invalidation: app.state.cache.invalidate_tags([...]).
  • X-Cache: HIT / MISS response header.
  • Only GET / HEAD + 2xx responses are cached.
  • 35 tests, ruff + pyright strict clean.
  • Python 3.12 / 3.13, hawkapi>=0.1.7.