Update README.md

Added note to help users who choose Redis as their backing store not get stuck.
This commit is contained in:
Han 2013-05-05 23:51:30 -07:00
parent 22f051fa2d
commit 51d50cc4c1

View file

@ -89,6 +89,8 @@ A [Rack::Request](http://rack.rubyforge.org/doc/classes/Rack/Request.html) objec
### Throttles
*NOTE:* If you are using Redis as backing store, Redis-ActiveSupport does not recognize `1.second` so just specify the `:period` parameter in seconds.
# Throttle requests to 5 requests per second per ip
Rack::Attack.throttle('req/ip', :limit => 5, :period => 1.second) do |req|
# If the return value is truthy, the cache key for the return value