Best Practice to handle caching for the same Type multiple times RRS feed

  • Question

  • I have come across a scenario quite often where I need to cache the same view(type) at the same time to keep the navigation correct. 

    E.g. - A very simplified example - I'm on the item detail page and i have like-kind items on a section of the page. If the user taps on one the like-kind items, it would take them to the same view(type), the item detail page; but with that new item's details. Now if I press the back button I would expect to see the first item's details; however, since caching is done by type. It will only show the second item's details, since it over wrote the first instance. 

    For phone, navigation was based on uri, which gave use the flexibility to tack on GUID/ID or something to make it different from the other instances of that view. Therefore, the navigation structure is keep in tack.

    How can I solve this dilemma without having to make nested viewmodels with parents and child types or building out my own navigation class? What is Microsoft guidance on this scenario?




    Friday, April 18, 2014 2:46 PM

All replies

  • If I understand your scenario correctly that is what the parameter argument to Navigate(sourcePageType,parameter) is for.

    If not, can you please clarify your scenario? How are you navigating? Can you provide a minimal repro?

    Friday, April 18, 2014 2:58 PM