My first Rails contribution - no_store HTTP cache directive31 Aug 2021
Rails is generally a feature rich framework and I rarely find anything
really missing when developing applications with it. However I recently
discovered that current Rails HTTP caching header facilities do not provide
a method to set
Cache-Control: no-store header. And it’s a popular way to
prevent browsers from rendering a possibly stale web page view when browser’s
“Return” button is used.
Things learned from that:
- It takes some patience. Ton of developers contribute to Rails repository daily and your PR may get lost in the traffic.
- Even seemingly harmless changes are likely to cause compatibility issues with existing code.
- Developers are not always using frameworks as intended. Peeking into and modifying internal framework objects happens - and there’s no way of telling how your changes will affect that.
- Getting through the review is only the first part. You may end up having to support some developers / answer some questions after the change is merged.
- Good commit messages help to avoid lengthy explanations in comments.