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

User info api #5356

Closed
wants to merge 1 commit into from
Closed

User info api #5356

wants to merge 1 commit into from

Conversation

SCdF
Copy link
Contributor

@SCdF SCdF commented Feb 7, 2019

Allows for users to get meta information about themselves, or for
administrators to get meta information about others.

For now this shows the theoretical document count for an offline user
based on their replication configuration

@SCdF SCdF requested a review from garethbowen February 7, 2019 11:42
@SCdF
Copy link
Contributor Author

SCdF commented Feb 7, 2019

@garethbowen here is what I wrote before that you can base your API off. You can either take the thing whole cloth (note there are no tests yet) or use it as inspiration!

One improvement you may want to do, depending on where you're using this, is keeping a cache (in memory or otherwise) of these counts whenever we generate them naturally as part of replication, so you can return that instead of generating it each time, as this is quite a slow call. For a user with 7500 documents on my mostly idle laptop it took 1.5 seconds.

@SCdF
Copy link
Contributor Author

SCdF commented Feb 7, 2019

(TBC: hat tip to @dianabarsan for this idea, and her help debugging it!)

Allows for users to get meta information about themselves, or for
administrators to get meta information about others.

For now this shows the theoretical document count for an offline user
based on their replication configuration
@garethbowen
Copy link
Member

@SCdF Can this be deleted now, or does it have something useful that the merged PR does not?

@SCdF SCdF closed this Oct 18, 2019
@SCdF SCdF deleted the doc_count_api branch October 18, 2019 08:10
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

2 participants