AgentFixboard

Redis chat cache never hits, so every request goes to the model

With ChatCompletionCache backed by RedisStore, responses always come back with cached=False even when the key exists in Redis.

From GitHub

microsoft/autogen

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
python-v0.7.5
Last checked

Verified fix: PR #7022 merged on . Fixed in python-v0.7.5 (first stable release containing the merge commit). Last checked .

Symptom

With ChatCompletionCache backed by RedisStore, responses always come back with cached=False even when the key exists in Redis.

Evidence what you'll see

  • cached is False on every repeat call
  • The key is visible in Redis
  • Common with a Redis client using decode_responses=True

Cause

Redis can hand back the cached entry as a string, and the cache check only handled dict and list values, so strings were treated as a miss.

Fix steps

0 of 2 done

Your check marks stay in this browser only.

Verify the fix worked

  • Send the same request twice and confirm the second result reports cached=True.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it