From 66a6b6d89b590159f2f3e8ca9bd5f65105e5043b Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Tue, 8 Nov 2016 14:58:15 -0800 Subject: [PATCH] Always put in cache on mutation, assuming persistence --- platform/core/src/runs/TransactingMutationListener.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/core/src/runs/TransactingMutationListener.js b/platform/core/src/runs/TransactingMutationListener.js index 01d765f1bb..274f983b26 100644 --- a/platform/core/src/runs/TransactingMutationListener.js +++ b/platform/core/src/runs/TransactingMutationListener.js @@ -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)) {