Is there any advantage to PersistentComponentState over MemoryCache? #54621
Unanswered
DavidThielen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For Blazor
InteractiveServer
render mode, the Microsoft documentation suggest that on the pre-render call I (and you) read the needed data for the page and save it to the PersistentComponentState. Then on the 2nd call toOnInitializeAsync
, read from the PersistentComponentState to populate the page.Why note use MemoryCache? Is there any downside to doing so? Reading the Microsoft documentation it looks like this is an app global data store, not an per circuit store. So I think MemoryCache is basically the same thing.
??? - thanks - dave
Beta Was this translation helpful? Give feedback.
All reactions