cache data on local storage