I'm trying to understand how rack-attack uses memcached to throttle connections.
As far as I can tell there's no easy way to manage lists in memcached, and no way to search keys by prefix. Yet rack-attack is somehow keeping a list count within cache, but I'm staring at the source code and can't figure out how it works?
https://github.com/kickstarter/rack-attack/blob/master/lib/rack/attack/throttle.rb https://github.com/kickstarter/rack-attack/blob/master/lib/rack/attack/cache.rb