In DObject O/R Mapping persistence layer, setting caching property to data-objects and they will be loaded to cache when they are used for the first time and will be read directly from cache when you are querying again, thus to improve the system's performance.
All operations of cached objects will be processed in cache and can be synchronized real-timely with database, which is transparent to developers and need no special managements.
At present, DObject O/R Mapping suite only provides single transaction level caching: LocalCache, which supports caching of data object provided in the same transaction (transaction is managed by ObjectManager).
In the same transaction, wherever the data objects managed by caching are, in object-set or in single variable or even as related object, all will be updated if one is done. And it is transparent to developers.
For the added object, it will automatically update to all relation object-sets after being saved (You can refer to "Relation Object's Lazy-load").
If a data object is deleted, then all in different object-sets will be deleted.
Cache update taking effect: if exist transaction processing, it will take effect when committing transaction, else it will directly take effect while saving or deleting.
DObject O/R Mapping suite provides some convenient functions of caching management, such as refreshing cache etc...
Related Topics