move cache store into a stuct