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

[feature request] Add caching capabilities to cache successful links for some time #31

Open
boillodmanuel opened this issue Nov 25, 2020 · 5 comments

Comments

@boillodmanuel
Copy link

hi,
I use markdown-link-check and thanks for it 👍

This would be nice to add a caching capabilities in order to cache successful links for some time.

This will make the checking faster and also more reliable (as some links could timeout sometimes).

@NicolasMassart
Copy link
Contributor

Doesn't it cancel the interest of testing links? What if the link is broken and your cache says it's not? How long would you like your cache to be retained?
If it's about links being used in the same project in multiple places, a unicity check at the site level would be probably better and would be ok as only for a run. In this case, having this done at marksdown-link-checker level seems better to me.
Let me know if I misunderstand your need.

@boillodmanuel
Copy link
Author

I will explicit my use-case.

I have a wiki on gitlab, and I want to check that links are not broken after each page update to detect this as soon as possible.

I would say that 50 pages are updated per day.
One link-check run of the whole wiki lasts about 5 min.

Using a cache of working links for 1 day (or more) would save a lot of time.

  • A working link is broken if the website is down or if the page has moved (not so often)
  • A new link could be broken for lot of reason, but mainly because it's simply wrong

Using a cache will speed up detection of new link that are wrong, whereas all links could be check only once a day.

@NicolasMassart
Copy link
Contributor

Hum interesting. Let me sleep on it a bit, I have to run the scenarios in my head...
@tcort any opinion on this one?

@tcort
Copy link
Owner

tcort commented Mar 9, 2023

@tcort any opinion on this one?

I'm open to a pull request which would implement some form of RFC 7234 compliant HTTP caching.

@tcort
Copy link
Owner

tcort commented Mar 9, 2023

I'm considering switching from needle to got which supports caching and a ton of other features.

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

3 participants