Skip to content

Commit

Permalink
Revert "Assume Rails will always provide a cache."
Browse files Browse the repository at this point in the history
This reverts commit 6ba4fe3.
  • Loading branch information
ioquatix committed Jul 25, 2023
1 parent 6ba4fe3 commit 635707a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rack/attack/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Cache
attr_reader :last_epoch_time

def self.default_store
if Object.const_defined?(:Rails)
if Object.const_defined?(:Rails) && Rails.singleton_class.method_defined?(:cache)
::Rails.cache
end
end
Expand Down

0 comments on commit 635707a

Please sign in to comment.