Welcome Guest, Not a member yet? Register   Sign In
Models stepping on each other?
#1

[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.


Messages In This Thread
Models stepping on each other? - by El Forum - 03-09-2010, 07:33 PM
Models stepping on each other? - by El Forum - 03-10-2010, 08:51 AM
Models stepping on each other? - by El Forum - 03-10-2010, 09:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB