Skip to content

chore: remove rack-cache and its memcachier backend - #1231

Merged
salzig merged 1 commit into
masterfrom
chore/remove_rack_cache
Nov 9, 2026
Merged

salzig merged 1 commit into
masterfrom
chore/remove_rack_cache

Conversation

@salzig

@salzig salzig commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

The HTTP cache in front of Rails stores nothing in production: MemCachier rejects every login (cache error: Error authenticating: 0x20, then No server available on each request), and rack-cache passes the request through. Removing it loses nothing and stops the error line logged on every request.

  • Nothing else used it: rack-cache was the only consumer of MemCachier. The app does not use Rails.cache or fragment caching.
  • Cloudflare already covers the one cacheable response: only the avatar proxy (ImagesController#show) sends a public cache header, and Cloudflare caches it (a live avatar answers MISS, then HIT). Pages are sent as private, so rack-cache never stored them even when it worked.
  • Little to gain from a replacement: in a one-minute sample of the router log, avatars were 3 of 68 requests and 6% of dyno time, none requested twice.
  • Checked by hand: a local production-mode boot without any memcached; Rack::Cache is gone from the middleware stack and the avatar proxy still sends Cache-Control: public, immutable.
  • Follow-up after deploy: heroku addons:destroy memcachier -a onruby removes the add-on and its three config variables.

@salzig
salzig merged commit 90a436f into master Nov 9, 2026
1 check passed
@salzig
salzig deleted the chore/remove_rack_cache branch November 9, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant