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

The default NewsFeed module does not respect the rss TTL value #2883

Closed
bootstrap-prime opened this issue Jul 19, 2022 · 8 comments
Closed

Comments

@bootstrap-prime
Copy link

bootstrap-prime commented Jul 19, 2022

I found a bug in MagicMirror

Browser: Firefox
Hardware: Linux, NixOS
Node version: v16.15.0
MagicMirror: v2.20.0

Description:
The default NewsFeed module does not respect the rss TTL (time-to-live) value. Providers can set this to request that feed readers check every N minutes, which can ease strain on their services. (See xeiaso.net for an example of a provider that sets this ttl value).
It would be helpful if MagicMirror supported this.

Also, the default reloadInterval is too high - a more reasonable default would be every 30ish minutes.

@sdetweil
Copy link
Collaborator

you mean too frequent? ('too high', but actually too low, number)

@bootstrap-prime
Copy link
Author

sorry, yes

@khassel
Copy link
Collaborator

khassel commented Jul 20, 2022

what do you mean with "support this".

The ttl value is accessible in the module, so we could do something, but what? Should we increase the updateInterval if it is below ttl?

@bootstrap-prime
Copy link
Author

Yeah, essentially.
I think the best approach would probably be to make reloadInterval an Option(ms) type, (or the js equivalent).
if you set reloadInterval, it is whatever you set it to. If reloadInterval is unset, it is the default (which would be bumped up to every 30mins) or the ttl (if present).

@sdetweil
Copy link
Collaborator

reloadInterval is already a configurable option, default 5 mins.

anyone could change it in their config.

it could be overridden by the feed ttl

@khassel
Copy link
Collaborator

khassel commented Jul 21, 2022

the above PR uses now ttl for reloadInterval if submitted by the feed (and if < 24h as mentioned in the docs).

The default reloadInterval is not changed, because I think this is not necassary. You can set a reloadInterval globally for the newsfeed module and for each feed (which should be sufficient). Changing the default value would affect all installations which rely on the current defaults.

@sdetweil
Copy link
Collaborator

thank you for logging that Feed TTL overrides the config option

@khassel
Copy link
Collaborator

khassel commented Oct 1, 2022

fixed in new release v2.21.0, should be closed @bootstrap-prime @MichMich

@MichMich MichMich closed this as completed Oct 2, 2022
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

No branches or pull requests

4 participants