Cache

For #841 and #734. Tests are failing because they're trying to instantiate cache which is now an abstract class. Looking at fixing those.