Model Cache updates models on mutation
This commit is contained in:
@@ -28,8 +28,13 @@ define([], function () {
|
||||
* @constructor
|
||||
* @memberof platform/core
|
||||
*/
|
||||
function ModelCacheService() {
|
||||
function ModelCacheService(topic) {
|
||||
this.cache = {};
|
||||
topic('mutation').listen(function (domainObject) {
|
||||
if (this.has(domainObject.getId())) {
|
||||
this.put(domainObject.getId(), domainObject.getModel());
|
||||
}
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user