I would argue that is bad, not because the location, but of control, since the purpose of a View is to present data to the browser, not control the cache header inside of the Response. I suggest to look for a way to detect if a View is being rendered, and then change the Response headers.

Graphic Designer graduate. Full Stack Web Developer. Retired Tech & Gaming Editor.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store