Skip to content

"How would this proposal work with caching?" is misleading #4

@linusg

Description

@linusg

The determination of whether the type attribute is part of the module cache key is left up to hosts (as it is for all import attributes).

That's not true. From https://tc39.es/ecma262/#sec-HostLoadImportedModule:

If this operation is called multiple times with two (referrer, moduleRequest) pairs such that:

  • the first referrer is the same as the second referrer;
  • ModuleRequestsEqual(the first moduleRequest, the second moduleRequest) is true;

and it performs FinishLoadingImportedModule(referrer, moduleRequest, payload, result) where result is a normal completion, then it must perform FinishLoadingImportedModule(referrer, moduleRequest, payload, result) with the same result each time.

The import attributes are part of the module request so they are mandatory for the cache key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions