-
Notifications
You must be signed in to change notification settings - Fork 74
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
Multi level caching suggestion? #168
Comments
Hey 👋 !! That's actually a very good and interesting suggestion, it definitely would be very useful, I think it really worth exploring it. Let me try to come up with a design for this, but also feel free to open a PR or put your thoughts/ideas here. Thanks for the suggestion, it is pretty good! Will try to give you feedback soon! |
Yes if I get a chance next week I'll have a look at the source code and have a play... |
Closing this issue since I haven't received feedback for a long time ago. Feel free to reopen it or create a new one if the implemented feature (#169) doesn't solve it. |
Hi loving Nebulex it's really fantastic!
This would mean instead of adding an entry to the cache for that specific {User, sub} it became multi layered and it would store in the main cache {User, id}, updating it there should this be needed and also adding a reference to this value from {User, sub}. This means that we can now just delete {User, id} from the cache with cache_evict and not have to track each type of lookup.
Taking the following as a further example of how mapped_to could be useful we could do the following:
And I think there is (nearly) a enough info for the above to hit the database only for the values not in the mapped cache list already?
Probably this is a bit complex and I shouldn't worry, just would have been nice with what I'm building to know I wasn't hitting the DB rather than the cache to update the leaderboard as participants enter and leave a classroom. Maybe there is already a way to do this in Nebulex I would not be surprised!
WDYT?
The text was updated successfully, but these errors were encountered: