summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README6
1 files changed, 5 insertions, 1 deletions
diff --git a/README b/README
index 5ab97aa..7f8bbe1 100644
--- a/README
+++ b/README
@@ -8,6 +8,9 @@ SYNOPSIS
enable "APIRateLimit", requests_per_hour => 2, backend => "Hash";
# or
enable "APIRateLimit", requests_per_hour => 2, backend => ["Redis", {port => 6379, server => '127.0.0.1'}];
+ # or
+ enable "APIRateLimit", request_per_hour => 2, backend => Redis->new(server => '127.0.0.1:6379');
+
sub { [ '200', [ 'Content-Type' => 'text/html' ], ['hello world'] ] };
};
@@ -30,7 +33,8 @@ DESCRIPTION
VARIABLES
backend
Which backend to use. Currently only Hash and Redis are supported.
- If no backend is specified, Hash is used by default.
+ If no backend is specified, Hash is used by default. Backend must
+ implement set, get and incr.
requests_per_hour
How many requests is allowed by hour.