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

also cache backend for user in memory instead of always going to redis #36639

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

icewind1991
Copy link
Member

@icewind1991 icewind1991 commented Feb 9, 2023

remote caches aren't that cheap.

There are probably some other cases that do this manually that can be replaced with WithLocalCache, but that is left as an exercise for a follow up PR.

@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Feb 9, 2023
@icewind1991 icewind1991 added this to the Nextcloud 26 milestone Feb 9, 2023
@icewind1991 icewind1991 requested review from a team, ArtificialOwl, blizzz and come-nc and removed request for a team February 9, 2023 14:07
@icewind1991 icewind1991 force-pushed the userbackend-local-cache branch 2 times, most recently from 478249b to 295d5ee Compare February 9, 2023 14:19
Copy link
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CappedMemoryCache in user_ldap could benefit from using this instead I think

Signed-off-by: Robin Appelman <robin@icewind.nl>
use OCP\ICache;

/**
* Wrap a cache instance with an extra later of local, in-memory caching
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yo dawg

@ChristophWurst ChristophWurst merged commit 364e769 into master Feb 15, 2023
@ChristophWurst ChristophWurst deleted the userbackend-local-cache branch February 15, 2023 18:33
@blizzz blizzz mentioned this pull request Feb 15, 2023
@juliusknorr
Copy link
Member

@icewind1991 Any specific reason to only put this as a private API? I could imagine this might be useful for app developers as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants