Skip to content

Commit 87e9778

Browse files
committed
Query directly through the database connection
This prevents the instantiation of active record objects
1 parent f7c84d8 commit 87e9778

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/solid_cache/entry.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def read(key)
3333

3434
def read_multi(keys)
3535
without_query_cache do
36-
find_by_sql([select_sql(keys), *key_hashes_for(keys)]).pluck(:key, :value).to_h
36+
connection.select_rows(select_sql(keys), "SQL", key_hashes_for(keys)).to_h
3737
end
3838
end
3939

0 commit comments

Comments
 (0)