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

Is the cache test allowed to load all at once? #9308

Open
atavistock opened this issue Oct 3, 2024 · 1 comment
Open

Is the cache test allowed to load all at once? #9308

atavistock opened this issue Oct 3, 2024 · 1 comment

Comments

@atavistock
Copy link
Contributor

items = Rails.cache.fetch_multi(*ALL_IDS.sample(query_count)) do |id|

I was under the impression that this should be a loop doing multiple lookups that may or may not hit the cache. This implementation is doing one large cache lookup and filling in the blanks. Should I change other implementations to match?

@volyrique
Copy link
Contributor

I don't think that there is any requirement like that. In fact requirement 6 says the opposite:

Additionally, if a separate caching process is used (see below), it is acceptable to fetch all of the randomly-selected objects using a single cache query operation.

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

No branches or pull requests

2 participants