Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/identity_cache/query_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading