As I embark on creating a mid-sized Angular application, one of my requirements is to store data and utilize it at the end of the user journey for sending to the server (as per company security policy regarding customer data transport). As a relatively new Angular developer, I have been exploring various approaches and have concluded that utilizing a "dataFactory" or service would be the best way to go in order to maintain cleanliness in the app without cluttering it with a "master controller," etc.
My specific query pertains to whether I should simply use a normal variable within this service to assign key:value pairs, or if it would be more optimal to create a cacheFactory within the service to store the data. What are the advantages and disadvantages of each approach?