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

Make resources.Get use a file cache for remote resources. #9228

Closed
bep opened this issue Dec 2, 2021 · 1 comment · Fixed by #9230
Closed

Make resources.Get use a file cache for remote resources. #9228

bep opened this issue Dec 2, 2021 · 1 comment · Fixed by #9230

Comments

@bep
Copy link
Member

bep commented Dec 2, 2021

As I mentioned briefly, I'm in the process of improving some core things in Hugo (including some cache work), but I think we should get the recent remote support in resources.Get + XML support out in its own Hugo release.

To do that, I think we should make the remote resources.Get cache to disk and not to memory (as it is now).

See:

https://github.com/gohugoio/hugo/blob/master/tpl/data/resources.go#L47

I suggest that we set up a new named file cache, name it getresource, and update the docs about it here:

https://gohugo.io/getting-started/configuration/#configure-file-caches

Perhaps make a note about its usage in resources.Get but only for remote resources.

@vanbroup something you would want to take on and implement?

@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 Jan 14, 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.

1 participant