cleanup cache invalidation

this is a prerequisite to some other work i was doing to make it easier to call invalidation (and is just generally nicer)