Added cache controlling. Closes #48