developmentseed / developmentseed/deck.gl-raster

Improve caching behavior around Chrome disk cache

Open
#342 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
228
Forks
29
Avg merge
12h 27m
Merged PRs (30d)
4

Description

According to docs about Chrome HTTP caching behavior: https://www.chromium.org/developers/design-documents/network-stack/http-cache/

> The cache implements a single writer - multiple reader lock so that only one network request for the same resource is in flight at any given time.

So it seems that other requests for the same file will be handled **serially** by Chrome, which is very bad.

I think ideally we want

```
fetch(url, {
headers: { Range: "bytes=..." },
cache: "no-store",
});
```

which chatgpt says

- Bypasses browser cache
- Avoids lock
- Keeps server/CDN caching intact

But to do that we need access to more `fetch` properties than just `headers`, which is what https://github.com/blacha/chunkd/blob/9b7e1480d2435d06b87a0f716e3d35ab94111f80/packages/source-http/src/index.ts#L35-L38 currently exposes.

https://github.com/blacha/cogeotiff/issues/1446 should hopefully make it easier to build source interfaces

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.