mirror of
https://github.com/nasa/openmct.git
synced 2024-12-22 06:27:48 +00:00
Always put in cache on mutation, assuming persistence
This commit is contained in:
parent
d74eba1922
commit
66a6b6d89b
@ -39,6 +39,8 @@ define([], function () {
|
||||
mutationTopic.listen(function (domainObject) {
|
||||
var persistence = domainObject.getCapability('persistence');
|
||||
var wasActive = transactionService.isActive();
|
||||
cacheService.put(domainObject.getId(), domainObject.getModel());
|
||||
|
||||
if (persistence.persisted()) {
|
||||
if (!wasActive) {
|
||||
transactionService.startTransaction();
|
||||
@ -51,8 +53,6 @@ define([], function () {
|
||||
);
|
||||
}
|
||||
|
||||
cacheService.put(domainObject.getId(), domainObject.getModel());
|
||||
|
||||
function unlistenAndCall(f) {
|
||||
return function () {
|
||||
if (MUTATION_TRACKER.has(domainObject)) {
|
||||
|
Loading…
Reference in New Issue
Block a user