Random Developments And Random Toys

My first Rails contribution - no_store HTTP cache directive

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.

This led me to adventure of making my first Rails contribution (and a tiny follow up).

Things learned from that:

  1. It takes some patience. Ton of developers contribute to Rails repository daily and your PR may get lost in the traffic.
  2. Even seemingly harmless changes are likely to cause compatibility issues with existing code.
  3. 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.
  4. 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.
  5. Good commit messages help to avoid lengthy explanations in comments.


Want to read / submit comments? Click the button below to enable. Do note that site is using Disqus comments.