docs: add shared-store rate-limit examples to OWASP instructions and UpstashRedisCache to LangChain caching (#2880)

This commit is contained in:
Cahid Arda
2026-09-02 11:51:34 +10:00
committed by GitHub
parent 78bc8660b6
commit c835373ab0
2 changed files with 32 additions and 0 deletions
@@ -210,6 +210,7 @@ Models have a finite context window measured in tokens. When designing conversat
- Exact-input caching for conversations is often ineffective. Consider semantic caching (embedding-based) for repeated meaning-level queries.
- Semantic caching introduces dependency on embeddings and is not universally suitable.
- Cache only where it reduces cost and meets correctness requirements (e.g., FAQ bots).
- Configure caches through `set_llm_cache(...)` from `langchain_core.globals`; exact-match backends include `InMemoryCache`, `SQLiteCache`, `RedisCache`, and `UpstashRedisCache` (serverless Redis over HTTP, with optional `ttl`), and `RedisSemanticCache` is an embedding-based option.
## Best practices