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 · 1 comment

Comments

Projects
None yet
2 participants
@RealOrangeOne
Contributor

RealOrangeOne commented Jul 10, 2017

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 the Enhancement label Jul 10, 2017

@bep bep added this to the v0.26 milestone Jul 10, 2017

@RealOrangeOne

This comment has been minimized.

Show comment
Hide comment
@RealOrangeOne

RealOrangeOne Jul 19, 2017

Contributor

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

Contributor

RealOrangeOne commented Jul 19, 2017

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

@bep bep closed this in #3717 Jul 21, 2017

bep added a commit that referenced this issue Jul 21, 2017

tpl: Use hash for cache key
Use a hash for the cache key, to fix 'file name too long' errors when retreiving from long urls

Fixes #3690
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment