Skip to content

Add Redis-backed LLM cache #34

Closed

Description

@AmitoVrito

Description

Add a RedisCacheBackend as an alternative to the in-memory AsyncLRUCache, for shared caching across processes.

Context

From docs/FEATURE_PARITY.md — LangChain supports memory, SQLite, and Redis caching. SynapseKit only has in-memory.

What to do

  • Create src/synapsekit/llm/_cache_redis.py
  • Use redis as optional dep: pip install synapsekit[redis]
  • Same interface as AsyncLRUCache: get(key), put(key, value), clear()
  • Add TTL support
  • Wire into BaseLLM via LLMConfig(cache_backend="redis", cache_url="redis://...")
  • Add tests (mock redis)

Reference

src/synapsekit/llm/_cache.py

Activity

  1. AmitoVrito commented on Mar 12, 2026

    @AmitoVrito
    CollaboratorAuthor

    Thanks for your interest! I will assign it to you. Before you start, could you give the repo a ⭐? It really helps with visibility for a new project. Looking forward to your PR!

  2. added
    enhancement
    on Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions