From 4f88c2354c04deb8a122563c7d903f9cf006ad84 Mon Sep 17 00:00:00 2001 From: inoshperera Date: Thu, 18 Feb 2021 08:48:29 +0530 Subject: [PATCH] Fix cache not updating --- .../mgt/core/status/task/impl/DeviceStatusMonitoringTask.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/status/task/impl/DeviceStatusMonitoringTask.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/status/task/impl/DeviceStatusMonitoringTask.java index a873c2f60e..99e0bd0c3e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/status/task/impl/DeviceStatusMonitoringTask.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/status/task/impl/DeviceStatusMonitoringTask.java @@ -116,8 +116,7 @@ public class DeviceStatusMonitoringTask extends DynamicPartitionedScheduleTask { DeviceIdentifier deviceIdentifier = new DeviceIdentifier(monitoringData.getDevice() .getDeviceIdentifier(), deviceType); - DeviceCacheManagerImpl.getInstance().removeDeviceFromCache(deviceIdentifier, - monitoringData.getTenantId()); + monitoringData.getDevice().setEnrolmentInfo(enrolmentInfo); DeviceCacheManagerImpl.getInstance().addDeviceToCache(deviceIdentifier, monitoringData.getDevice(), monitoringData.getTenantId()); }