PatrickStankard / homebridge-fujitsu-airstage

A Homebridge plugin to control devices that use the Fujitsu Airstage API.
MIT License
3 stars 1 forks source link

Update device, user metadata cache without resetting it #12

Closed PatrickStankard closed 3 months ago

PatrickStankard commented 3 months ago

Add and use refreshUserMetadataCache and refreshDeviceCache to the Airstage client. This allows you to update the cache without completely clearing it first, which prevents race conditions where the cache is being updated, and something attempts to read from it before it is updated.