refacotring on existing token cache implementations