It’s funny, I didn’t set out for that to be the case. When I pitched the idea internally, I wanted to scratch my own itch (what on earth is a cached token?) and produce a good post. But then I realised I had to go deeper and deeper to get to my answer and accidentally made a very long explainer.
Thanks for the post, it's near perfect in focus, detail and how it's written.
EDIT: You have some minor typos in the post (psuedocode)