Skip to content

Commit f2f1c80

Browse files
authoredApr 22, 2024··
Query cache is now a Store class instead of a Hash (#1162)
1 parent 37be69c commit f2f1c80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎test/support/core_ext/query_cache.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ module SqlIgnoredCache
2222
# compromising cache outside tests.
2323
def cache_sql(sql, name, binds)
2424
result = super
25-
26-
@query_cache.delete_if do |cache_key, _v|
25+
26+
@query_cache.instance_variable_get(:@map).delete_if do |cache_key, _v|
2727
# Query cache key generated by `sql` or `[sql, binds]`, so need to retrieve `sql` for both cases.
2828
cache_key_sql = Array(cache_key).first
2929
Regexp.union(IGNORED_SQL).match?(cache_key_sql)

0 commit comments

Comments
 (0)
Please sign in to comment.