倉庫指標
- Star
- (4,680 star)
- PR 合併指標
- (平均合併 7天 4小時) (30 天內合併 20 個 PR)
描述
The Rack::Attack docs suggest it should have a cache to itself. When I initially added it, it did, but with SolidCache we've started using Rails.cache from the app, and plan to more in #1585. We're already seeing the downsides of a shared cache. When Rack::Attack is busy, its entries crowd out HTML fragments that could be cached for months.
So we need to add sqlite cache to config/database.yml.example to dedicate to rack::attack, with size + date limits appropriate to its use (probably a few gigs and a week, given our config), and pass that to Rack::Attack to use.
Please test the error message other contributors will get if they try to start a rails dev server without updating their config/database.yml. That file has to be .gitignored so people will certainly get some kind of exception. It would be great if we could catch it and explain what steps they need to take to update.