TAL-255, tidied up code based on feedback. create a cacheKey up front which we use for the lookup, and does not overwrite the original token