change cache logic