No commit activity in last 3 years
No release in over 3 years
A tiny gem for using any Sequel-supported database as a rack-throttle counter cache.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

Sequel rack-throttle

A tiny gem for using any Sequel-supported database as a rack-throttle counter cache.

Installation

Run the following command from your command line:

gem install 'sequel-rack_throttle'

or add this line to your Gemfile:

gem install 'sequel-rack_throttle'

Usage

require '<adapter>'
require 'sequel/rack_throttle'

use Rack::Throttle::Interval, :cache => ThrottleAdapter.new(<sequel db object>, <optional table name>)

Please provide an existing database in your connection string. The gem will automatically create a designated table in the given database if it does not exist already (with name throttle_cache if you do not define otherwise explicitly). Make sure you require the desired database driver as well!

For further information about throttling your API, check rack-throttle examples.