Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Call reload in without block #11

Open
wants to merge 1 commit into
base: fork
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion lib/second_level_cache/active_record/persistence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def update_column_with_second_level_cache(name, value)
end

def reload_with_second_level_cache(options = nil)
reload_without_second_level_cache(options).tap{expire_second_level_cache}
self.class.without_second_level_cache do
reload_without_second_level_cache(options)
end.tap{expire_second_level_cache}
end

def touch_with_second_level_cache(name = nil)
Expand Down