kickstarter/rack-attack — pull request #18 by madlep (2013-06-16 23:06:44+00:00)
Title: Fail2ban

Helper to allow [fail2ban](http://www.fail2ban.org/wiki/index.php/MANUAL_0_8#Jail_Options) pattern.

If a number of bad requests (`maxretry`) are received within a specified period (`findtime`), any requests matching the filter are banned for a specified period (`bantime`)

Related to https://github.com/kickstarter/rack-attack/pull/16 , and based on [suggested approach](https://gist.github.com/ktheory/5723534).

This change also includes adding `read` and `write` methods to `Rack::Attack::Cache` (which are needed for this approach), and refactoring it with `Rack::Attack::StoreProxy` to make managing the cache implementation differences easier (Redis, memcached etc).