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

use hash as cache key - file name too long #3690

Closed
RealOrangeOne opened this issue Jul 10, 2017 · 2 comments · Fixed by #3717
Closed

use hash as cache key - file name too long #3690

RealOrangeOne opened this issue Jul 10, 2017 · 2 comments · Fixed by #3717

Comments

@RealOrangeOne
Copy link
Contributor

Related to forum thread https://discourse.gohugo.io/t/getjson-cache-raises-file-name-too-long/7373

When getting JSON data from an API with a very long url, the download runs fine, but if the cache path is too long, a 'file name too long' error is raised.

Potential Solution

rather than using the full URL as the filename, you instead used a hash (doesnt matter which), then the filename will be far shorter, and a uniform length.

@bep bep added this to the v0.26 milestone Jul 10, 2017
@RealOrangeOne
Copy link
Contributor Author

As this is currently blocking future depoyments on my website, I've started working on a fix myself

@bep bep closed this as completed in #3717 Jul 21, 2017
bep pushed a commit that referenced this issue Jul 21, 2017
Use a hash for the cache key, to fix 'file name too long' errors when retreiving from long urls

Fixes #3690
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants