Next on our List is the user's Profile page with more fields and social information:

Updating Profile via API
To do this, we will extend the Livewire class for Profile with more fields and load the data from cache instead of Auth::user():
Next on our List is the user's Profile page with more fields and social information:

To do this, we will extend the Livewire class for Profile with more fields and load the data from cache instead of Auth::user():
if cache driver is database.. this isn't applicable on the web right?
We are sending a request to our API to update the user information. Then that updated information gets stored on local app cache driver
oh i see.. actually i am not really familiar with mobile dev.. i am planning to create an app that can be access through mobile and web, so what i am going to do is set the cache key into a unique key for web app? is that correct?
I see that there is a confusion here on your part :) Let me clarify it:
You have your Web application - it is your main source of truth that has a database and everything is handled inside that application.
Then you want to create a mobile app. This means that your Web app needs to get API built inside of it. This API will act as a "communication bridge" for your mobile app to your web database.
From here, anything you do in your mobile app - has to call the Web server API and do actions there. This is both for retrieving the data and saving the data.
What does that mean for you?
When dealing with any information on the mobile app - you have completely isolated system. Mobile app knows nothing about how the web works or what it does. It just knows that "I have this API endpoint that I call when something happens".
The same goes for your Web application - it has no idea that mobile applications even exist. It has it's own API which allows some actions to happen. But it doesn't know how or who will do these actions. (who is figured out by logging in).
And the cache key within the mobile application has no impact on the web application as the web application can't read that cache key whatsoever. It can read the API request, but never what is within the mobile app.
So to answer your question in short - no, changing the key to be unique for web will do nothing. Web doesn't use cache for user information, it uses database. Only the mobile application uses cache to avoid calling API too much.
Finally, my recommendation before you start building this - learning about the API and API clients - would help. That way you would understand how the API works and what mobile apps can or can't do.
oh.. actually i was thinking that i dont need to make another app for mobile.. i want to use my existing app..
This is not advised since you will leak sensitive information.
In general - mobile application works differently. Even if you can use the same tools - it shouldnt be the same code :)
Yeah.. i think i know what to do now.. thanks for the guidance!