Tobi Throttle Save

Simple plugin which allows you to throttle certain activities in your web apps. Uses memcached for speedy implementation and requires Rails 2.1+

Project README

Throttle arbituary operation. Once limit is reached it will raise a Throttle::LimitExeeded exception.


Throttle.for("feed:#{request.remote_ip}", :max => 20, :in => 10.minutes) do render :xml => Articles.all end

If you want to clear the timeout for the current block ( for example: fraud protection. Clear the throttle when the submitted Credit Card was valid. ) your block can accept a yielded throttle object and call the clear method

Throttle.for("cc:#{request.remote_ip}", :max => 20, :in => 10.minutes) do |throttle| if
throttle.clear redirect_to :action => 'done' end end

Open Source Agenda is not affiliated with "Tobi Throttle" Project. README Source: tobi/throttle
Open Issues
Last Commit
15 years ago

Open Source Agenda Badge

Open Source Agenda Rating