Since Apollo has Apollo Cache for storing local data. I want to store auth token inside the Apollo cache instead of local storage. By store to Apollo Cache, help me clear auth token and other caching data when user logout without caring about local storage data.
My question is: Is it OK if I store auth token in Apollo Cache? Because example of Authentication from Apollo website is using local storage for storing auth token, this make me confusing.
I decided to store
auth tokeninLocal Storageinstead ofApollo Cachebecause I made benchmark to measure speed of retrievingtokenfromLocal StorageandApollo Cache,result is: retrieve fromLocal Storagefaster thanApollo Cachearound 3 ~ 4 times