-
Notifications
You must be signed in to change notification settings - Fork 6
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
Remove session caching #208
Conversation
6393328
to
c8ceb17
Compare
This is an experimental build, using an API client that doesn't cache Panoptes user sessions. - See zooniverse/panoptes-javascript-client#208.
This is an experimental build, using an API client that doesn't cache Panoptes user sessions. - See zooniverse/panoptes-javascript-client#208.
c8ceb17
to
4c017e4
Compare
This is an experimental build, using an API client that doesn't cache Panoptes user sessions. - See zooniverse/panoptes-javascript-client#208.
4c017e4
to
135c162
Compare
Remove session caching from `auth.checkCurrent()`. Instead, add a `_fetching` state which is true while a user session is being fetched from Panoptes.
135c162
to
c903c7e
Compare
This is an experimental build, using an API client that doesn't cache Panoptes user sessions. - See zooniverse/panoptes-javascript-client#208.
This seems like completely reasonable use of the API, but as a part of the review of this PR, I'd like to make sure we know where and how this is called and whether "spam" is a fair description. |
This branch breaks the new classifier. 🙁 |
Login/logout is broken on this branch too. |
So, each of our frontend projects has a block of code like this, which runs import auth from 'panoptes-client/lib/auth;
auth.listen('change', () => {
auth.checkCurrent();
}); The problem is:
This hasn't been a problem for us to date, because
I've started a rewrite of |
Remove session caching from
auth.checkCurrent()
. Instead, add a_fetching
state which is true while a user session is being fetched from Panoptes.This should close #207 by changing
auth.checkCurrent()
so that it always checks the Panoptes API when called, except if there is an API request already in progress.This could be a breaking change, in that
auth.checkCurrent()
will now spam the API if it is called too frequently.