Add selective cache purging rather than a generic purge all

I don't see this used anywhere.