The "right" way is debatable as there are often many ways to accomplish the same. So long as the approach is upgrade safe, you are usually fine.
I've done something similar to what you are referring to, for which I would assume you have a custom view.detail.php. If you don't, then I am not sure how to help you as the view.detail.php approach would allow you to forcibly reset the cache every time, thus eliminating the problem.
Assuming you did it that way, insert this line of code before the line that begins with $this->dv->setup...
Code:
TemplateHandler::clearCache($this->module,'DetailView.tpl');
Bookmarks