Showing
1 changed file
with
4 additions
and
1 deletions
... | ... | @@ -189,7 +189,10 @@ public class DeviceServiceImpl extends AbstractEntityService implements DeviceSe |
189 | 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 | 196 | @Override |
194 | 197 | public Device saveDevice(Device device, boolean doValidate) { |
195 | 198 | return doSaveDevice(device, null, doValidate); | ... | ... |