Now that every time the user opens a conversation's talking page, he gonna request a new pbtoken. That's fine.
But however, with the token changing, every time he opens the same conversation, it requires him to fully reload all photos from the probe. That might cause the resources download multiple times.
The lifetime of a pbtoken is 1 hour. But usually, the user won't stay in a conversation for more than 20 minutes. So what about cache all conversation - pbtoken keymap, and save the conversationId, tokenValue and tokenOutTime to local storage?
So every time I open the same conversation, gonna query for a token which lifetime still remains for more than 20 minutes? If not found, then request a new one. So the download link of our resources can be unchanged.
What do you suggest we do?
Now that every time the user opens a conversation's talking page, he gonna request a new pbtoken. That's fine.
But however, with the token changing, every time he opens the same conversation, it requires him to fully reload all photos from the probe. That might cause the resources download multiple times.
The lifetime of a pbtoken is 1 hour. But usually, the user won't stay in a conversation for more than 20 minutes. So what about cache all
conversation - pbtoken
keymap, and save theconversationId
,tokenValue
andtokenOutTime
to local storage?So every time I open the same conversation, gonna query for a token which lifetime still remains for more than 20 minutes? If not found, then request a new one. So the download link of our resources can be unchanged.
Additional context
Nothing.