Programatically clearing the cache (development PR)

Implementation work on issue #8.