Distributed cache is a central dedicated server that persists cache. Distributed cache is good when you have a load balanced environment or as you pointed out persisting cache when the application restarts. Ultimately, it depends on your needs which is not evident from the description.
InMemory token cache vs distributed token cache
Hi,
I am working on a .netcore 3.1 API project. This project uses On Behalf of flow to get the user profile using Graph API.
For development purpose I was using InMemory token caching which worked fine.
But I can see on the msdn site they do recommend Distributed Token Cache.
Does it really matter for an API project which caching I use? The only token cache it uses would be to save the access_token to call the Graph API.
I read the benefit of Distributed Token Cache is it retains the cache after an app restart?
If the traffic is really high on the API would it be wise to use the Distributed Token Cache? Or would InMemory be ok?