-
Notifications
You must be signed in to change notification settings - Fork 15
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
⚡ limit the cache queries to some optimal numbers #99
Conversation
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.
I don't really know where this cache is used but I would prefer, if possible, to add a maximum number per page
ORDER BY volume DESC | ||
LIMIT 900`, |
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.
- default ORDER BY volume DESC?
- hardcoded 900?
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.
@roiLeo description |
cc @ma-shulgin 👀 |
should be used for all KodaDot stats - spotlight - series - whales |
Can you explain it to me with a simple use case? |
This queries are already in use for routes /spotlight |
I still don't understand why you need to put a limit on cached query |
Because cache query on full data took about 30 sec to calculate and server ran out of the memory check #97 |
When is the cache updated? |
We dont need that :) that's why we implemented limit |
Setting limits to the cache queries:
Spotlight 400
Series 900
How did I get those numbers?
for series I care about collection who has at least 1 KSM in the volume
for spotlight want to see artists that have sell something
to be safe with the numbers:
794 -> moved to 900 - in case we have more collections
540 -> if user is not in the first half than ngmi