[eluser]Unknown[/eluser]
I've got a question about models that are loaded in by the same controller.
I have an e-commerce application with multiple stores. Say Customer A is purchasing from one store that loads in a customer model. If Customer B is on the site and loads up another request that uses the customer model, will Customer B potentially use the same customer model that Customer A pulled up? The different stores have different implementations of some customer data, so I want to make sure Store X's customer data is not intermingled with Store Y's customer data.
How can I best ensure that Customer B doesn't use Customer A's customer model that is currently in memory in cases of high-traffic?
Should I use a factory pattern since CI has Singleton implementations of models and controllers (please shed some light and correct me if I am wrong?) I have not used a factory pattern, before by the way.
Thanks in advance.