steveklabnik/request_store
Per-request global storage for Rack. observed · 2026-08-28
Health v2 · maintenance only
23/100
- Activity 0
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 5007
- days_rel: n/a
- days_push: 854
- n_releases_24m: 0
Adoption not part of the score
1500 stars · 90 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
RequestStore is a Ruby gem providing per-request global storage for Rack applications, replacing error-prone Thread.current usage with request-scoped state that is cleared after each request. It ships as Rack middleware with a Rails Railtie and Sidekiq integration.
Use cases
- store per-request state in Rails without Thread.current leaks
- share data like current_user across middleware and controllers
- avoid stale global state on threaded servers like Puma or Thin
- clear request-scoped variables between Sidekiq jobs
- memoize per-request values with RequestStore.fetch
When to choose
- you need request-scoped global state in a Rack/Rails app
- Thread.current values leak across requests on threaded servers
- you want simple per-request memoization or context storage
When to avoid
- you need distributed or persistent storage rather than in-process state
- you are not on Rack or a Rack-compatible framework
- you need state scoped to something other than an HTTP request or job
Facets
library · maturity stable
middleware caching web-framework web-development backend developer-tools ruby rack-middleware thread-local-storage request-scoped-state rails sidekiq web-server rack
2 sources
- readme: https://github.com/steveklabnik/request_store · fetched 2026-08-28 · e9fc1dd3866a
- homepage: https://github.com/steveklabnik/request_store · fetched 2026-08-29 · 8ab390ac1034
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| steveklabnik/request_store | main | 23 |
For agents
markdown · JSON · MCP: product_card(name="steveklabnik/request_store")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem