Fix bug when cache contains invalid content, network data does not clear cache but append to cache