The Wire · Showcase
SPROCKETS CACHE LIMITS GET AN OFF SWITCH
By RepoJournal · Filed · About Rails
Sprockets just shipped an escape hatch for environments where the cache cleaner costs more than the cache it protects.
Jean Boussier landed a change [1] that lets you disable Sprockets' cache size limits entirely, saving you from stat()'ing thousands of entries in environments where assets rarely change. Pair that with the newly merged [2] `ignore_mtime` option [3], and you can strip out the last-modified-time revalidation that only adds noise when source files come from version control. Over in Rails core, Active Support is getting ahead of Ruby 4.1's plan to include `Time.rfc3339` as a default gem: the PR [4] switches the method to return a true UTC time for "Z" inputs, matching `Time.iso8601` and `Time.xmlschema`. The change drops a +00:00 fixed offset that "no test or documentation ever asserted," bringing Active Support in line with upstream. Solid Queue is also hardening its test suite against CI flakes [5], and the `fail_many_claimed` event now carries the error object so subscribers can distinguish mass failures from each other [6].
One email a day. Unsubscribe in one click.
Keep up with Rails in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Review Sprockets cache config if you deploy with static assets from CI rails/sprockets [plan]
- → Test `ignore_mtime` option in your CI asset pipeline to cut cache bloat rails/sprockets [monitor]
- → Watch `Time.rfc3339` change if you parse UTC timestamps in tests or docs rails/rails [monitor]
- → If you rely on `fail_many_claimed` events, check the new error field in Solid Queue rails/solid_queue [plan]
References
- [1] Allow disabling the cache limits rails/sprockets
- [2] Merge pull request #832 from byroot/disable-digest rails/sprockets
- [3] Implement `ignore_mtime` option rails/sprockets
- [4] Return a UTC time from `Time.rfc3339` for "Z" inputs ↗ rails/rails
- [5] Give in-flight jobs enough pause to survive slow shutdowns in tests ↗ rails/solid_queue
- [6] Include the error in fail_many_claimed events and document recovery ↗ rails/solid_queue