update index cache logic