Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added a Redis code example.

  • Loading branch information...
commit b6aca34549c2aa6bd1389a95549ca9988279e8d1 1 parent e8d203f
@bendiken bendiken authored
Showing with 16 additions and 1 deletion.
  1. +16 −1 README.md
View
17 README.md
@@ -8,6 +8,11 @@ with Sinatra.
* <http://github.com/datagraph/rack-throttle>
+Features
+--------
+* Works with the [memcached][], [memcache-client][], [memcache][] and
+ [redis][] gems.
+
Examples
--------
@@ -25,8 +30,14 @@ Examples
### Using Memcached to store rate-limiting counters
+ require 'memcached'
use Rack::Throttle::Interval, :cache => Memcached.new, :key_prefix => :throttle
+### Using Redis to store rate-limiting counters
+
+ require 'redis'
+ use Rack::Throttle::Interval, :cache => Redis.new, :key_prefix => :throttle
+
Documentation
-------------
@@ -73,4 +84,8 @@ License
`Rack::Throttle` is free and unencumbered public domain software. For more
information, see <http://unlicense.org/> or the accompanying UNLICENSE file.
-[Rack]: http://rack.rubyforge.org/
+[Rack]: http://rack.rubyforge.org/
+[memcached]: http://rubygems.org/gems/memcached
+[memcache-client]: http://rubygems.org/gems/memcache-client
+[memcache]: http://rubygems.org/gems/memcache
+[redis]: http://rubygems.org/gems/redis
Please sign in to comment.
Something went wrong with that request. Please try again.