From 9c9db3c24f816af126e8d8bdcfd88fe278384d0d Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Mon, 21 Mar 2016 10:31:38 -0700 Subject: [PATCH] [Add] Remove obsolete variable reference The cache has been externalized to allow writing to it upon domain object instantiation. --- platform/core/src/models/CachingModelDecorator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/core/src/models/CachingModelDecorator.js b/platform/core/src/models/CachingModelDecorator.js index ffa377cf0a..1ceae1bf88 100644 --- a/platform/core/src/models/CachingModelDecorator.js +++ b/platform/core/src/models/CachingModelDecorator.js @@ -59,7 +59,7 @@ define( // We update in-place to ensure there is only ever one instance // of any given model exposed by the modelService as a whole. function updateModel(id, model) { - var oldModel = cache[id]; + var oldModel = cacheService.get(id); // Same object instance is a possibility, so don't copy if (oldModel === model) { @@ -108,7 +108,7 @@ define( } // Otherwise, just expose the cache directly - return fastPromise(cache); + return fastPromise(cacheService.all()); }; return CachingModelDecorator;