summary refs log tree commit diff
path: root/README
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-03-30 15:36:54 +0200
committerfranck cuny <franck@lumberjaph.net>2010-03-30 15:36:54 +0200
commit4219e4f6082a902c68575614409453c7f1af25f5 (patch)
tree85b479e851ddb781d91647283d3a90cda9097234 /README
parentclean tests (diff)
downloadplack-middleware-apiratelimit-4219e4f6082a902c68575614409453c7f1af25f5.tar.gz
fix mail, update
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.