Skip to content

[import] Add host to cache folder structure #2072

@kptdobe

Description

@kptdobe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions