Is there a delay in cache invalidation taking effect?

We're on the Pro plan and have recently started using cache invalidation w/ our accelerate queries. We're seeing that queries immediately after cache invalidation are still getting the cached value - is this expected? Our use-case is that we're storing user data in the cache w/ a sanitized version of the user email as cache tag. When a new user signs-up, they'll originally have a null value in the cache. After we create the user in our DB, we invalidate the cache, but we see that queries still get the null value for 1-2 seconds after invalidation. What is the typical delay for invalidating the cache?
5 Replies
Nurul
Nurul2mo ago
Hey @derek-coveai 👋 Thanks for reporting. Let me check with our Accelerate team about the delay. In my opinion a certain amount of delay is expected as the invalidation needs to be propagated to all the POPs.
derek-coveai
derek-coveaiOP2mo ago
Thanks @Nurul ! From our logs, it looks like this happens for 1-2 seconds. If that is expected, we'll work around it.
Nurul
Nurul2mo ago
Hey @derek-coveai I checked with the team and also tested myself. There is a delay of 1-2 seconds for the updated response to come through. At the moment, this is expected. Our team is looking into ways on how we can reduce it further 🙏
derek-coveai
derek-coveaiOP2mo ago
Got it. Thanks @Nurul !
Nurul
Nurul2mo ago
No worries 🙂
Want results from more Discord servers?
Add your server