thkl / homebridge-homematic

Homematic plugin for homebridge: https://github.com/nfarina/homebridge
180 stars 51 forks source link

make platform level cache expire after 60s #718

Open GrimmiMeloni opened 1 year ago

GrimmiMeloni commented 1 year ago

suggested simple fix for #717 Adds a timestamp to the cached entries, and considers them outdated after 60s. This should protect the CCU/Rega from any bursts, but still allows updates to show in a reasonable time. I guess a 1 minute old value is still better than no updates at all.

No fancy stuff in here like async cache eviction, but gets the job done.

redtom13 commented 2 months ago

Tested and works