Skip to content

Commit c5d02f8

Browse files
committed
Fixed Observist#expire when the Rails.cache.delete_matched fails with exceptions, which it does if you call it after nuking the cache.
1 parent 1cca2e3 commit c5d02f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/observers/observist.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def self.expire(*args)
1818
when ActiveSupport::Cache::MemCacheStore
1919
Rails.cache.instance_variable_get(:@data).flush_all
2020
when ActiveSupport::Cache::FileStore
21-
Rails.cache.delete_matched(pattern)
21+
Rails.cache.delete_matched(pattern) rescue nil
2222
else
2323
raise NotImplementedError, "Don't know how to expire cache: #{Rails.cache.class.name}"
2424
end

0 commit comments

Comments
 (0)