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

Cache non existing DB user #1672

Merged
merged 1 commit into from
Oct 10, 2016
Merged

Cache non existing DB user #1672

merged 1 commit into from
Oct 10, 2016

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Oct 10, 2016

We always query the database backend. Even if we use a different one
(ldap for example). Now we do this everytime we try to get a user object
so caching that a user is not in the DB safes some queries on each
request then (at least 2 what I found).

CC: @nickvergessen @MorrisJobke @LukasReschke

We always query the database backend. Even if we use a different one
(ldap for example). Now we do this everytime we try to get a user object
so caching that a user is not in the DB safes some queries on each
request then (at least 2 what I found).

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer rullzer added enhancement 3. to review Waiting for reviews labels Oct 10, 2016
@rullzer rullzer added this to the Nextcloud 11.0 milestone Oct 10, 2016
@mention-bot
Copy link

@rullzer, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Xenopathic, @DeepDiver1975 and @nickvergessen to be potential reviewers.

@nickvergessen
Copy link
Member

Bad luck with parallel requests, but I guess this is acceptable.

👍

@nickvergessen
Copy link
Member

Should we update the flag on delete?

@rullzer
Copy link
Member Author

rullzer commented Oct 10, 2016

We could. Altough it is probabaly not needed. Will result in at most one 1 extra query in that request. (the request where you delete a DB user).

@LukasReschke
Copy link
Member

LGTM

@LukasReschke LukasReschke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Oct 10, 2016
@rullzer rullzer merged commit 2dcd97b into master Oct 10, 2016
@rullzer rullzer deleted the cache_non_exisiting_db_user branch October 10, 2016 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants