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

Remove incumbent/fetching record from Cache behavior #1190

Merged
merged 6 commits into from
Oct 13, 2017

Commits on Aug 22, 2017

  1. Remove incumbent/fetching record from Cache behavior

    This change removes the incumbent/fetching record concept that allowed
    committing a fetching resource to cache and match/matchAll to return a
    fully written existing resource, if any, with priority over a fetching
    resource. After this change, add/addAll/put promises resolve when the
    resources ared fully fetched and committed to cache. match/matchAll will
    not return any on-going fetching resources.
    
    This changes the specification type of underlying cache objects from a
    map (request to response map) to a list (request response list). The
    change is to make the arguments and the return values of the Cache
    methods and algorithms (Batch Cache Operations and Query Cache) conform
    to one another. The list type seems fine as the algorithms tend to
    iterate through the list to find certain items with search options.
    Looking at the details of the acutal implementations, I plan to update
    it further if needed.
    
    Fixes #884.
    jungkees committed Aug 22, 2017
    Configuration menu
    Copy the full SHA
    7554362 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2017

  1. Follow-up changes addressing comments

    The changes include:
     - Replace CacheBatchOperations dictionary which isn't exposed to
       JavaScript surface with cache batch operations struct.
     - Do not store JS objects in the storage but store request and response
       structs instead.
     - Create and return JS objects in the target realm when requested (from
       matchAll() and keys()).
     - Simplify "put" operation related steps by moving/refactoring the
       post-Batch Cache Operation steps, which clear the invalid items, from
       addAll() and put() into Batch Cache Operations.
     - Move the argument validation steps of cache.keys() out of the
       parallel thread to main thread.
     - Fix cacheStorage.keys() to run the steps async. (For now, it still
       runs just in parallel, but later I plan to use the parallel queue
       concept: https://html.spec.whatwg.org/#parallel-queue).
    jungkees committed Sep 28, 2017
    Configuration menu
    Copy the full SHA
    948e077 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2017

  1. Address comments

    jungkees committed Oct 11, 2017
    Configuration menu
    Copy the full SHA
    d31dd3d View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2017

  1. Address additional comments

    - Adjust variable scope
    - Change to early-exit in fetch abort cases
    - Fix async steps of fulfillment handlers
    - Change the interface of Batch Cache Operations algorithm
     . Change to not return a promise
     . Remove the in parallel steps and make it work synchronously
     . Change the call sites to call it in a created promise's in parallel
       steps
    jungkees committed Oct 13, 2017
    Configuration menu
    Copy the full SHA
    4c6078e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8c0f52c View commit details
    Browse the repository at this point in the history
  3. Temporarily copy HTMLs again

    jungkees committed Oct 13, 2017
    Configuration menu
    Copy the full SHA
    fbf6f44 View commit details
    Browse the repository at this point in the history