Added function set_cached_user

The use case is as follow:

We need to overwrite how the user is stored on the cache when the request is not finished yet.

Currently, this is not possible, we can only invalidate the cache on request, not set the cache