Rocket.Chat.Electron icon indicating copy to clipboard operation
Rocket.Chat.Electron copied to clipboard

chore: Improve clear cache

Open jeanfbrito opened this issue 3 months ago • 1 comments

https://rocketchat.atlassian.net/browse/DSK-111

When a workspace with various instances of the server gets updated sometimes the Meteor's cache gets stuck in a version that is not available on that connected server making the user stuck in a loading loop.

To clear this cache we need to destroy IndexedDb and other storages that Meteor uses as cache control so the next reload will not try to execute old files from the cache.

We used to have a Clear cache action that only ignores the browser cache, but don't helps with the Meteor cache issue. So to fix this the user needed to use the Clear storage data that will destroy all the storage data and make the user need to log in again which could feel advanced or dangerous to be done by them.

Users misunderstood it because the issue was a cache problem but the Clear cache doesn't work for this. So we are simplifying to a new option that will resolve when needed and yet be clearer to users who don't need to understand cache.

These are the changes:

Remove Clear cache and Clear storage data from server context menu. image

Add Force reload to server context menu and menubar on View image

A dialog will ask the user if the login session will be kept. image

If Keep login session is clicked, all the cache storage will be destroyed but localStorage will be kept intact, keeping the session intact. If Delete login session is clicked, all the cache and localStorage will be destroyed and the user will need to login again.

jeanfbrito avatar Mar 27 '24 17:03 jeanfbrito

@jeanfbrito can you add images of the old menus and explain the reason for the change?

rodrigok avatar Mar 28 '24 16:03 rodrigok