Suppose my page hierarchy is
AViewModel->BViewModel
In every ViewModel (registered as PerRequest) I load the data from server in the OnActivate method and set a flag (private bool class variable) that the data is loaded.
In Windows Phone 8 and Windows Phone 8.1 Silverlight, when the user navigates back from BViewModel, the AViewModel, then in OnActivate the ViewModel knows that the data is already loaded (the flag is true) and does nothing.
This does not work in Windows Phone 8.1 because each time the user navigates back, the ViewModel is created again (I can see the constructor call).
When I set NavigationCacheMode=NavigationCacheMode.Required; in all the views, then the flag survives the back navigation. The problem with this solution is that when I navigate back from BViewModel back to AViewModel, the flag lives so the data is not loaded again but (that is ok) but when I then navigate to BViewModel (with different parameter), then nothing happens because BViewModel was not destroyed and it is reused, with the flag saying that data does not need to be loaded.
Is there a way to make it behave exactly like in Windows Phone 8 (or 8.1 Silverlight)