guzzle-cache-middleware icon indicating copy to clipboard operation
guzzle-cache-middleware copied to clipboard

Fix cache entry with key with vary headers isn't deleted

Open janalwin opened this issue 3 years ago • 1 comments

Two cache entries are created when the response has vary headers. But when you call delete, only the entry without the vary headers in the cache key is deleted. When you do a new call directly after deletion everything is ok. The cache entry without vary info is created again and returned. But if you use the Laravel backend, the cache entry with vary info won't be updated. (a If you repeat the call, the old cache entry with the vary info will be returned and not de fresh cache entry.

To fix this problem, we now delete both entries in the delete method.

janalwin avatar Jul 05 '22 14:07 janalwin

Can you write some tests for this use-case and rebase your branch from master?

Kevinrob avatar Nov 05 '23 12:11 Kevinrob