From 69d9e1bfde4b1111e093d3cfd417a9c368d1d409 Mon Sep 17 00:00:00 2001 From: KumatomatomaKu Date: Tue, 6 Oct 2020 14:14:20 +0900 Subject: [PATCH] call reload in without block --- lib/second_level_cache/active_record/persistence.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/second_level_cache/active_record/persistence.rb b/lib/second_level_cache/active_record/persistence.rb index 0cd725b..25fa6a5 100644 --- a/lib/second_level_cache/active_record/persistence.rb +++ b/lib/second_level_cache/active_record/persistence.rb @@ -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)