Cache API - randomly started working
Hey all,
We've had a worker running for months, which gets a fair amount of traffic. We had some logic in place using the Cache API to help speed up some requests. Behind the scenes we're using D1, so the Cache layer was put in to speed up slow requests.
We never saw the cache being hit, it always missed.
One day we started to get a load of errors coming through, which was due to bad caching logic on our part (storing the wrong data in the
Response
which was cached). Looking at our logs, we saw that many requests were now being cached as expected initially. This started to happen:
2024-03-04 23:02:03.305
There had been no changes on our end - worker deployments, settings etc. We've now fixed the bad logic and redeployed, the cache is now working as we'd expect.
Is there any reason or someone which could do some investigation for us as to why the Cache API randomly started to work again? It's a little disconcerting for us.
Thanks!0 Replies