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

Add relation between client cache and user’s token #5603

Merged
merged 1 commit into from
Jan 16, 2017

Conversation

rodrigok
Copy link
Member

Closes #5537

@RocketChat/core

@rodrigok rodrigok added this to the 0.49.2 milestone Jan 16, 2017
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-5603 January 16, 2017 18:15 Inactive
@geekgonecrazy
Copy link
Contributor

@rodrigok this looks good. What does doing this accomplish? Clears it out if the user logs out? Just making sure 😄

@rodrigok
Copy link
Member Author

@geekgonecrazy Yes, it is relating the cache data with the user's token.

When cache is loading we compare the saved token with the current token, if the token is different we clear the cache and load all from database.

We are clearing the cache when users logout, but there is an edge case where the token expires and meteor does not remove the token (logout) and shows the login screen, with this change the cache will be cleared even if the logout does not do the work.

We are not enabling this relation for public-settings cuz it is the same for all users and for non logged users too.

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.

Channel list empty
3 participants