Add functionality for clearing cache

Closes #9 and closes #10.