README.md in raterr-0.1.1 vs README.md in raterr-0.1.2
- old
+ new
@@ -21,17 +21,17 @@
$ gem install raterr
## Usage
For Ruby based application you need to tell `Raterr` what store to use.
-Currently it supports a simple hash or a `ActiveSupport::Cache::MemoryStore`
+Currently it supports a simple hash, or `Redis`
It is best to load the store in an initializer of any other kind of file
that is loaded initially.
```ruby
# Use either
-Raterr::Cache.store = ActiveSupport::Cache::MemoryStore.new
-# Or
Raterr::Cache.store = Hash.new
+# Or
+Raterr::Cache.store = Redis.new
```
To enforce rate limiting use:
```ruby
Raterr.enforce(request, period: :minute, max: 200, code: 429)
```