@grishka welcome to second hardest problem in tech: cache invalidation :)
But I disagree, of course you know when to query it: when your user asks you to.
@mariusor there's the prevalent kind of user: they want everything to "just work". Making them click buttons to re-fetch their friends' friend lists makes it too cumbersome and gives the impression of a buggy product.
VK used to have this problem where different databases on different servers would get out of sync and there would be notification counters when you don't actually have any. There was a button in settings to "recount" them. It was eventually fixed and the button was removed.
@mariusor there's the prevalent kind of user: they want everything to "just work". Making them click buttons to re-fetch their friends' friend lists makes it too cumbersome and gives the impression of a buggy product.
VK used to have this problem where different databases on different servers would get out of sync and there would be notification counters when you don't actually have any. There was a button in settings to "recount" them. It was eventually fixed and the button was removed.