adobe / adobe/helix-cli

[import] Add host to cache folder structure

Open
#2,072 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
68
Forks
72
Avg merge
1d 3h
Merged PRs (30d)
8

Description

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`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.