Ideally in this first stab at a plugin, I am going to be pulling an affiliate coded off the URL and loading information about it from the database/cache. I want to do this early in the execution of the page, but far enough along where the user data has been loaded if they have "remember me" checked.
What hook would you recommend I use for this process?
Also, what is the best way to cache that information for future requests from this user session? I can write my own cookie and cache mechanism, but I didn't know if there was an object in XenForo that I should just extend and leverage what's already being done. (this should work for both guest and unauthenticated users)
Thanks for your help.