Ignore this unless you’re using a Rack handler and ActiveRecord.
If you’re using a vanilla rack handler or Grape or JSONRPC2 or something similar that accesses your database via ActiveRecord, and you’re mounting it directly in Rack you’ll probably benefit from using the ActiveRecord::QueryCache. Unless you’re going through the rails stack, you don’t get this for free - you have to ask.
1
|
|
It’s just a standard piece of Rack Middleware, but it turns on DB caching for the duration of the request.
e.g.
1 2 3 4 5 |
|