7 Replies
Hey @Sara , can you say more about what you are trying to do? Feel free to open a thread in #support-community
I had an incident where the queries got cached, and they were showing deleted records from the function queries, so I had to filter them out on the frontend like so:
so I had to also filter it in my frontend:
This is not caused by caching. Convex has "perfect caching", it cannot give you stale results. What's likely happening here is that you have users with channel IDs corresponding to deleted channels.
and in the logs it says it is cached:

this is exactly what is happening!
Yeah, so you have to decide whether that's ok for your app, or whether when a channel is deleted the user should be deleted too. Or prevent channel deletion when there exists a user with the channel ID.
Does that make sense?
(And once you handle the nulls correctly you can remove the try {} catch around your query)
yep that makes great sense, I thought that when the channel is deleted anything associated with it will be gone as well, soI'll rewrite the logic to remove the user, thanks!
sure thing, every snippbit I saw doesn't require them, but I just write them by default, I'll remove them soon