Cache API instance

Can you check if this is kosher since I messed up last time with TokenCache?