Cache header and footer partials.