Is setCache implemented?


#1

Hi,

Looks like setCache is not yet implemented. But is mentioned on http://book.agiletoolkit.org/model/core.html. even coundn’t find it in any of atk4.3 code. What are plans for caching models.

As for big projects reaccessing some ref at various functions can be resource intensive. :frowning:


#2

Cache is actually implemented in a basic form, you need to call $model->addCache() though.

Here are some test-scripts:

It’s not a documented feature and after implementing basic caching I’ve realised that there might be different caching scenarios and I was looking for better solution.

I wouldn’t use addCache just yet and instead implement my own proxy controller to handle transparent saves. That should be relatively easy, see http://book.agiletoolkit.org/controller/data.html.