MDL-40903 cache: fixed up event invalidation