All this additional logic should probably be handled, as above, by some third class able to work with the Etag IMO. That would allow re-using it in other view helpers, resolvers, etc