Hi,
I have in one project classes organized with ActivePattern (example : myObject->Load()) but now we need to implement some caching and caching is problematic.
To make it simples, the Load() method in every object call the DAL my giving the $this reference and the DAL fill up the object that all values. It works. But when we add some caching the object unserialized is a "new" object and the DAL cannot sent it back to the object because we have a reference to the object that need to be loaded. The only work around is to put the cache code inside the Load() of each object and to loop all properties from the caching object to Get the value and to Set it back to the real object.
Is there a better way to use caching with ActiveRecord Pattern?