added persistant offline cache
added timout handling