Skip to content

Commit

Permalink
Assume Rails will always provide a cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jul 25, 2023
1 parent fe42809 commit 6ba4fe3
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) && Rails.singleton_class.method_defined?(:cache)
if Object.const_defined?(:Rails)
::Rails.cache
end
end
Expand Down

0 comments on commit 6ba4fe3

Please sign in to comment.