2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-30 14:55:18 +00:00

Allow cachied sensor readings up to a second old.

In the process of reworking cache logic, a temporary disabling was left in.

Before the logic change, 'cache' of '1' meant 'True', but the intent was a max age to decline to reply.  This allows very close together requests to be cached.
This commit is contained in:
Jarrod Johnson
2026-09-28 16:10:12 -04:00
parent 649eb107d7
commit 838a017563
@@ -1967,7 +1967,7 @@ class OEMHandler(object):
if 'sensedata' in sensor:
reading = sensor['sensedata']
else:
reading = await self._do_web_request(sensor['url'], cache=False)
reading = await self._do_web_request(sensor['url'], cache=1)
return self._extract_reading(sensor, reading)
async def get_sensor_data(self):