Skip to content

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

Merged
engelgabriel merged 1 commit intodevelopfrom
client-cache-user-relation
Jan 16, 2017
Merged

Add relation between client cache and user’s token#5603
engelgabriel merged 1 commit intodevelopfrom
client-cache-user-relation

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

Comments