Commit a2881bf
perf: memoize blobs requests in the request scope (#2777)
* test: add test case with multiple fetches for same resource and test asserting we only check blobs once per request for same key
* refactor: create simplified key-value store interface to interact with blobs with common tracing pattern
* refactor: create reusable helper to record warnings
* perf: memoize blobs requests in the request scope
* refactor: rename RequestSpecificInMemoryCache to RequestScopedInMemoryCache
* refactor: modulurize blobs storage abstractions
* chore: fix lint
* refactor: move non-CacheHandler related types and utils from cache-types to blob-types module
* fix: add missing implementation for isTagManifest and isHtmlBlob type guards
* chore: drop use of noOpInMemoryCache
---------
Co-authored-by: Mateusz Bocian <mrstork@users.noreply.github.com>1 parent 67d6c7b commit a2881bf
File tree
20 files changed
+729
-170
lines changed- src
- build/content
- run
- handlers
- storage
- tests
- fixtures/revalidate-fetch/app/same-fetch-multiple-times/[id]
- integration
- tools
20 files changed
+729
-170
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
75 | 83 | | |
76 | 84 | | |
77 | 85 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
16 | 34 | | |
17 | 35 | | |
18 | 36 | | |
19 | | - | |
| 37 | + | |
20 | 38 | | |
21 | 39 | | |
22 | 40 | | |
| |||
25 | 43 | | |
26 | 44 | | |
27 | 45 | | |
28 | | - | |
29 | | - | |
| 46 | + | |
30 | 47 | | |
31 | 48 | | |
32 | 49 | | |
33 | | - | |
34 | | - | |
| 50 | + | |
35 | 51 | | |
36 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
37 | 57 | | |
38 | 58 | | |
39 | 59 | | |
| |||
0 commit comments