move cache into it's own struct