diff --git a/platform/core/src/capabilities/PersistenceCapability.js b/platform/core/src/capabilities/PersistenceCapability.js index 91c5147bfe..af21618ee3 100644 --- a/platform/core/src/capabilities/PersistenceCapability.js +++ b/platform/core/src/capabilities/PersistenceCapability.js @@ -149,9 +149,6 @@ define( getKey(domainObject.getId()), domainObject.getModel() ]).then(function(result){ - if (result) { - cacheService.remove(domainObject.getId()); - } return rejectIfFalsey(result, self.$q); }).catch(function(error){ return notifyOnError(error, domainObject, self.notificationService, self.$q); diff --git a/platform/core/test/capabilities/PersistenceCapabilitySpec.js b/platform/core/test/capabilities/PersistenceCapabilitySpec.js index d9b93c9e12..7e214db147 100644 --- a/platform/core/test/capabilities/PersistenceCapabilitySpec.js +++ b/platform/core/test/capabilities/PersistenceCapabilitySpec.js @@ -176,12 +176,8 @@ define( expect(mockQ.reject).not.toHaveBeenCalled(); expect(mockNofificationService.error).not.toHaveBeenCalled(); }); - - it("removes the model from the cache", function () { - persistence.persist(); - expect(mockCacheService.remove).toHaveBeenCalledWith(id); - }); }); + describe("unsuccessful persistence", function() { var sadPromise = { then: function(callback){