Commit eb8f115c6949a25c678449629c702fc5f51bdef7

Authored by Igor Kulikov
1 parent d20ea5ae

Fix device cache

@@ -189,7 +189,10 @@ public class DeviceServiceImpl extends AbstractEntityService implements DeviceSe @@ -189,7 +189,10 @@ public class DeviceServiceImpl extends AbstractEntityService implements DeviceSe
189 return doSaveDevice(device, accessToken, true); 189 return doSaveDevice(device, accessToken, true);
190 } 190 }
191 191
192 - @CacheEvict(cacheNames = DEVICE_CACHE, key = "{#device.tenantId, #device.name}") 192 + @Caching(evict= {
  193 + @CacheEvict(cacheNames = DEVICE_CACHE, key = "{#device.tenantId, #device.name}"),
  194 + @CacheEvict(cacheNames = DEVICE_CACHE, key = "{#device.tenantId, #device.id}")
  195 + })
193 @Override 196 @Override
194 public Device saveDevice(Device device, boolean doValidate) { 197 public Device saveDevice(Device device, boolean doValidate) {
195 return doSaveDevice(device, null, doValidate); 198 return doSaveDevice(device, null, doValidate);