The problem is when we instantiate an object as below:
$obj_user = new user($uid);
There would be a reference to that object in RAM, and when we refresh the page reference will be gone hence we wont have access to it on page refresh. How is that possible accessing an object via Memcached?
You would need to store the information in cache with MemCache or in the Session using the $_SESSION variables. Either way you will need to pass some kind if information to identify this user versus all of the other users. You can do this via a hidden form, a database entry, a txt file record, or other methods.
Once you have this identifier you can store it properly for later retrieval. Here is the MemCache example: