diff options
| author | franck cuny <franck@lumberjaph.net> | 2010-03-30 15:36:54 +0200 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2010-03-30 15:36:54 +0200 |
| commit | 4219e4f6082a902c68575614409453c7f1af25f5 (patch) | |
| tree | 85b479e851ddb781d91647283d3a90cda9097234 /README | |
| parent | clean tests (diff) | |
| download | plack-middleware-apiratelimit-4219e4f6082a902c68575614409453c7f1af25f5.tar.gz | |
fix mail, update
Diffstat (limited to 'README')
| -rw-r--r-- | README | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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. |
