Showing
1 changed file
with
4 additions
and
1 deletions
@@ -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); |