Rails evaluates view files and partials on every request. That is why html fragment caching is so valuable.
See Caching with Rails in Rails Guides.
Typically you would use Rails' cache to cache a html fragment so it does not need to be re-rendered on each request. Here's a Haml example:
- cache "key-name-for-static-content" do
.some-html
some content
See DHH's How Key-Based Cache Expiration Works for key-based caching using models.
For advanced uses, I wrote cache_rocket to help cache static content around dynamic content in partials.