# GPT-4o and GPT-4o-mini Cache Not Working?

**URL:** https://community.openai.com/t/gpt-4o-and-gpt-4o-mini-cache-not-working/1131911
**Category:** Bugs
**Created:** [February 28, 2025, 9:49am UTC](https://community.openai.com/t/gpt-4o-and-gpt-4o-mini-cache-not-working/1131911 "2025-02-28T09:49:28Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![davidia](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/davidia/32/174403_2.png) [@davidia](https://community.openai.com/u/davidia)
#### Post date: [February 28, 2025, 9:49am UTC](https://community.openai.com/t/gpt-4o-and-gpt-4o-mini-cache-not-working/1131911/1 "2025-02-28T09:49:28Z")

</div>

Hi everyone,

Today I noticed that the cache is not working for me with both GPT-4o and GPT-4o-mini. My code is exactly the same as before. The initial prompts I’m using are long enough to trigger the cache on successive calls, and caching was working correctly before.

Is anyone else experiencing the same issue? Any insights would be appreciated!

Thanks!

---

<div class="post-metadata">

### Author: ![sps](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/sps/32/7736_2.png) [@sps](https://community.openai.com/u/sps)
#### Post date: [February 28, 2025, 9:55am UTC](https://community.openai.com/t/gpt-4o-and-gpt-4o-mini-cache-not-working/1131911/2 "2025-02-28T09:55:44Z")

</div>

Hi @davidia,

Thanks for reporting.

I just tested it, and it seems to be working on `gpt-4o` but not on `gpt-4o-mini`.

---

<div class="post-metadata">

### Author: ![davidia](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/davidia/32/174403_2.png) [@davidia](https://community.openai.com/u/davidia)
#### Post date: [February 28, 2025, 10:15am UTC](https://community.openai.com/t/gpt-4o-and-gpt-4o-mini-cache-not-working/1131911/3 "2025-02-28T10:15:37Z")

</div>

Thanks for checking! I tested again, and caching now works with GPT-4o—not sure if it just started working or if I missed it before. But GPT-4o-mini is still not working.

---

<div class="post-metadata">

### Author: ![vinicius.cestari.h](https://avatars.discourse-cdn.com/v4/letter/v/b487fb/32.png) [@vinicius.cestari.h](https://community.openai.com/u/vinicius.cestari.h)
#### Post date: [November 18, 2025, 5:15pm UTC](https://community.openai.com/t/gpt-4o-and-gpt-4o-mini-cache-not-working/1131911/4 "2025-11-18T17:15:42Z")

</div>

Just tested it today (18/11/2025) and GPT-4o-mini Cached Input is still not working.

---

<div class="post-metadata">

### Author: ![kailashprj2209](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@kailashprj2209](https://community.openai.com/u/kailashprj2209)
#### Post date: [March 2, 2026, 12:38pm UTC](https://community.openai.com/t/gpt-4o-and-gpt-4o-mini-cache-not-working/1131911/7 "2026-03-02T12:38:40Z")

</div>

First updated the openai library to the latest version and try this it will work.

response = openai.ChatCompletion.create(  
model=“gpt-4o-mini”,  
messages=[{“role”: “system”, “content”: “static instructions…”}, {“role”: “user”, “content”: “Your question”}],  
prompt\_cache\_retention=“in\_memory”  
)

---

<div class="post-metadata">

### Author: ![VeitB](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/veitb/32/712987_2.png) [@VeitB](https://community.openai.com/u/VeitB)
#### Post date: [March 2, 2026, 2:00pm UTC](https://community.openai.com/t/gpt-4o-and-gpt-4o-mini-cache-not-working/1131911/8 "2026-03-02T14:00:22Z")

</div>

Closed because this is a topic from February 2025
