On 2010-10-02 11.28, Niclas Hedhman wrote:
1. UnitOfWork already has a state and instance cache as a HashMap. Although the logic is slightly different from what I describe, it felt natural to plugin to the same concepts.
Wait, are you going to plugin the cache in UoW? Not EntityStore?
2. Providing "clone-on-modify" to reduce caching space needed when a lot of read-only entities are being requested.
If you want to make clone-on-modify (which makes since given read-mostly apps), then it seems most natural to make a custom EntityState that does the clone on set-methods. If you start with the JSONEntityState it's basically an if-not-cloned-then-clone clause before doing the set, and that should be all.
/Rickard _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

