Clean up cache code and remove pathtoentry mixin