
RequestStore gives you per-request global storage of variables for Rack- compliant web servers. It is intended as an alternative to Thread.current, to avoid bugs in threaded server implementations. RequestStore supports Rails 3+ out-of-the-box, but can be configured for use in Rails 2.x and non-Rails environments.