Added cache option to templates.

Because compiling and rendering razor templates can take too long.