mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 15:18:12 +00:00
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