openhab-core icon indicating copy to clipboard operation
openhab-core copied to clipboard

[ephemeris] Add option for disabling the cache

Open clinique opened this issue 1 year ago • 6 comments

Adds possibility to disable user defined holiday description files caching. This in interesting especially when defining/debugging these files. A new option can be set in the ephemeris.cfg file, cache=true/false. Default value is true, so no breaking change if the option is absent.

clinique avatar Dec 10 '24 09:12 clinique

The caching behaviour has been identified as a source of problems many times in the forum. Current workaround being to rename the file for every modification.

clinique avatar Dec 10 '24 09:12 clinique

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/updated-custom-ephemeris-file-required-openhab-restart-to-be-effectivein/160535/3

openhab-bot avatar Dec 10 '24 09:12 openhab-bot

It would be nicer if it would monitor changes to the file instead (e.g. using the WatchService) and then update the cached configuration.

wborn avatar Dec 10 '24 09:12 wborn

That was my first thought but I though this could be a first easy step. I blocked myself because ephemeris does not have a dedicated folder for user defined files, so they can be anywhere but I'll have a look at WatchService also.

clinique avatar Dec 10 '24 10:12 clinique

@clinique Could you please have a look at the failing tests?

kaikreuzer avatar Feb 15 '25 16:02 kaikreuzer

@clinique Any idea why the tests keep failing? It seems unrelated, but it is still failing, even after retriggering.

kaikreuzer avatar Feb 18 '25 21:02 kaikreuzer