Update guides/source/caching_with_rails.md

Co-authored-by: Juan Manuel Ramallo <juanmanuelramallo@hey.com>
This commit is contained in:
Alex Ghiculescu 2021-12-27 19:02:39 -06:00 committed by GitHub
parent 51b8ddf49e
commit 346f43f2b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -316,7 +316,7 @@ Instead, cache the ID or some other primitive data type. For example:
ids = Rails.cache.fetch("super_admin_user_ids", expires_in: 12.hours) do
User.super_admins.pluck(:id)
end
User.where(id: id).to_a
User.where(id: ids).to_a
```
### SQL Caching