In NObject O/R Mapping persistence layer, setting caching property to data-objects and they will be loaded to cache when being used for the first time and will be read directly from cache when querying again, thus to improve system 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, NObject O/R Mapping framework 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 object managed by caching is, 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 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.
NObject O/R Mapping framework provides some convenient functions of managing caching, such as refreshing cache etc...
Related Topics