diff --git a/lib/identity_cache/query_api.rb b/lib/identity_cache/query_api.rb index 845fc57b..a90171b2 100644 --- a/lib/identity_cache/query_api.rb +++ b/lib/identity_cache/query_api.rb @@ -166,11 +166,11 @@ def cache_fetch_includes # callback enqueues a background job, then we don't want it to be possible for the # background job to run and load data from the cache before it is invalidated. if ActiveRecord.version >= Gem::Version.new("7.1") - def run_callbacks(kind, type = nil, ignore_override: false) - if kind == :commit && (destroyed? || transaction_changed_attributes.present?) && !ignore_override + def run_callbacks(kind, type = nil) + if kind == :commit && (destroyed? || transaction_changed_attributes.present?) expire_cache end - super(kind, type) + super end else def run_callbacks(kind)