Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Improve clear cache #2869

Merged
merged 164 commits into from May 21, 2024
Merged

chore: Improve clear cache #2869

merged 164 commits into from May 21, 2024

Conversation

jeanfbrito
Copy link
Collaborator

@jeanfbrito jeanfbrito commented Mar 27, 2024

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.

src/servers/cache.ts Outdated Show resolved Hide resolved
src/servers/cache.ts Outdated Show resolved Hide resolved
src/servers/cache.ts Outdated Show resolved Hide resolved
src/servers/cache.ts Outdated Show resolved Hide resolved
src/ui/components/ClearCacheDialog/index.tsx Outdated Show resolved Hide resolved
Copy link
Member

@rodrigok rodrigok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing jira task

@rodrigok
Copy link
Member

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

@jeanfbrito jeanfbrito merged commit cf86a2f into master May 21, 2024
5 of 8 checks passed
@jeanfbrito jeanfbrito deleted the chore-improve-clear-cache branch May 21, 2024 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants