Cache views on first use

Closes #1