improve offline and cache