-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
[performance] add caching of status fave, boost of, in reply to ID lists #2060
[performance] add caching of status fave, boost of, in reply to ID lists #2060
Conversation
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
600525e
to
a92224c
Compare
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
…to cache lookups Signed-off-by: kim <[email protected]>
9291527
to
44e6942
Compare
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
…multierror test Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
Signed-off-by: kim <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
Just to check, when a new status is put in the database, does it also invalidate the boost IDs and reply IDs cache? Likewise for faves: does a new fave invalidate the faves/likes cache entries for that status ID?
I didn't see it in the code anywhere, so just wanted to verify that that's happening as expected.
Signed-off-by: kim <[email protected]>
When a new status or favourite is put in the database, it's wrapped in the cache.Store() function, which calls all the required invalidate hooks :) |
…se of multiple entries by same author Signed-off-by: kim <[email protected]>
Feel free to squerge when you're happy! |
Signed-off-by: kim <[email protected]>
Description
go-cache
library to use more fine-grained zero value detectionwipeStatus()
to use a multierror, to ensure full wipeThe diff for this ended up shorter than I thought for the amount of work that went in... This PR is only as short as it is as a culmination of other efforts I put into #2049 #2027.
Checklist
go fmt ./...
andgolangci-lint run
.