update isCacheOrnot method