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

[import] Add host to cache folder structure #2072

Open
kptdobe opened this issue Oct 10, 2022 · 0 comments
Open

[import] Add host to cache folder structure #2072

kptdobe opened this issue Oct 10, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@kptdobe
Copy link
Contributor

kptdobe commented Oct 10, 2022

Run hlx import --cache .cache/
Request http://localhost:3001/index.html?host=https://www.adobe.com then request http://localhost:3001/index.html?host=https://www.google.com.

The second request will get the content from the first one. The cache caches index.html as .cache/index.html as the initial intent was to proxy only one server. But it turns out that we might need to cache from multiple servers for the same import project (especially for images). While name conflict would be rare, it is cleaner to have a clear separation of the host, i.e. add the host name in the file structure (save under something like .cache/www.adobe.com/index.html and .cache/www.google.com/index.html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants