In my current project, I had to store some temporary data for a user and let a few background processors have access to it. I wrote something small with a dependency on Redis which does the job.
It allows me to use
current_user.tmp[:token_id] = "somedata here" and then access it
in the background processor using
user.tmp[:token_id] which I think is pretty neat.
Moreover, since my use case needed this for temporary storage, I set it to auto expire in 1 day. If yours is different you could change that piece of code.
And here is the user class
Hope you find it useful :)