Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

What is the difference between PersistentComponentState and MemoryCache?

$
0
0

For Blazor InteractiveServer render mode, the Microsoft documentation suggests that on the pre-render call I read the needed data for the page and save it to the PersistentComponentState. Then on the 2nd call to OnInitializeAsync, read from the PersistentComponentState to populate the page.

Why wouldn't I just use MemoryCache? Reading the Microsoft documentation it looks like this is an app global data store, not a per circuit store. So I think MemoryCache is basically the same thing... is that correct?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>