tags:

views:

30

answers:

2

I wonder if such a thing is possible or even exist :

In the MVC pattern, I would like to have the Model part to be persistant in memory, instead of reloading my instances at each execution. So I want only the Controller and View part to be executed.

Is there any solution of server that would provide PHP objects (just like a Mysql server provides data records), and that keeps these objects in memory ?

A problem would be also : how to have a constructed query to get objects ? Maybe PHP Linq ?

A: 

Take a look at APC and XCache. They enable you to keep any variable in memory between requests.

jholster
Nice, but I can't perform complicated queries on it (i have to go through a SQl request to know wich objects I want to get back)
Matthieu
A: 

I found that the best solution would be to use an ORM solution like Doctrine, it handles cache in memory and all I need.

Matthieu