Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ephemeris] Add option for disabling the cache #4491

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

clinique
Copy link
Contributor

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.

…ching.

This in interesting especially when defining/debugging these files.

Signed-off-by: Gaël L'hopital <[email protected]>
@clinique clinique requested a review from a team as a code owner December 10, 2024 09:28
@clinique
Copy link
Contributor Author

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.

@openhab-bot
Copy link
Collaborator

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

Signed-off-by: Gaël L'hopital <[email protected]>
@wborn
Copy link
Member

wborn commented Dec 10, 2024

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

@clinique
Copy link
Contributor Author

clinique commented Dec 10, 2024

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.

@wborn wborn changed the title [ephemeris] [ephemeris] Add option for disabling the cache Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants