Load function

Hello there. I am making a product catalog and I want to make a function that verifies that the product is loaded. I read all my products from an xml and then I display them 6 per page. I have multiple pages and I want that my application not to load again if I return to a page. I want everything to load once at runtime. The functionality is like a image gallery. I read from xml and then I display.
Thank you.