Closed craigmulligan closed 7 years ago
First is a query that goes down till the device. It is blocking, and it could be slow. Second is just cached value, if it exists.
Ah I see, so it will force a read if it doesn't exist?
Yes, first is forcing a read if there is no value recent enough. Here the definition of "recent enough" is a bit vague, as it depends on the underlying protocol, sensor, etc. Second (lastUpdate), will never go down to the protocol, it only returns the last read value.
What is the difference between: GET /device/{deviceId}/{componentId} GET /device/{deviceId}/{componentId}/lastUpdate
and also between: GET /device/{deviceId} GET /device/{deviceId}/lastUpdate
Each pair returns the same thing? Retire last update?