cache and invert seem to work