Skip to content

omnicache-ai v0.2.0

Choose a tag to compare

@github-actions github-actions released this 01 Jun 13:35
· 21 commits to main since this release

What's New in v0.2.0

Bug Fixes

  • FAISSBackend.delete(): switched IndexFlatIPIndexIDMap2 — deleted vectors now actually removed (previously caused stale semantic matches)
  • EvictionPolicy: was exported but never used; now wired into CacheManager and InMemoryBackend
  • LangChainCacheAdapter.clear(): was a silent no-op; now calls manager.clear()

New Features

  • CacheMetrics: hit/miss/eviction/set counters + hit_rate — access via manager.metrics
  • Pluggable Serializer: PickleSerializer (default) + JsonSerializer; all layers accept serializer=
  • StampedeShield: per-key lock in ResponseCache.get_or_generate() — prevents duplicate LLM calls under concurrency
  • TieredBackend: L1 memory + L2 Redis/disk with automatic promotion on read
  • AsyncCacheBackend + AsyncInMemoryBackend: native async backends for FastAPI / async LangGraph
  • OpenAICacheAdapter: wraps client.chat.completions.create (sync + async)
  • AnthropicCacheAdapter: wraps client.messages.create (sync + async)
  • GzipCompressor: optional compression wired into CacheManager
  • StreamingResponseCache: buffers streaming LLM output, replays from cache as generator
  • CLI: python -m omnicache_ai stats|flush|inspect <key>
  • pre-commit: ruff + mypy + file checks on every commit
  • Dockerfile: slim Python 3.12 image

Install

pip install omnicache-ai==0.2.0

See CHANGELOG for full details.