I do not understand yet Rails’ caching system, but I’ve read in the guides section of a feature called fragment caching.
My problem is: my view consist mostly in static elements. It is almost completely static, the only changing is a status message and a hidden input field in a form, both generated at every request to the action serving the view.
Is fragment caching suitable for this problem? What caching strategy should I use?
Fragment caching is adequate to your problem. It is adequate because it enables you to cache a part (fragment) of your view, instead of the whole view. From the docs:
So you can put your static part between the
cacheblock, and the dynamic part outside of it.Here’s the link to the relevant docs: rails fragment caching.