Skip to content

Commit 49e36fe

Browse files
authored
new post
1 parent 7fe33b0 commit 49e36fe

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

_posts/2022-09-18-cache-storage.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
date: Sun Sep 18 2022 12:01:22 -0700 (Pacific Daylight Time)
3+
qualitative_time:
4+
title: The uncoolness of CacheStorage
5+
previous_teaser: People who turn doorknobs away from the door hinge
6+
previous_first: true
7+
---
8+
I mean [this CacheStorage](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage), a browser API for saving HTTP-like Response objects indexed by HTTP-like Request objects.
9+
The thing commonly used from a Service Worker.
10+
11+
Three: The class that you end up using, Cache, has a name so generic that it's ungoogleable.
12+
13+
Two: You can't put a pending response into a Cache, so you have to do your own coordination to prevent a cache stampede.
14+
15+
One: The storage management and intended use cases make it seem not to be a cache at all. From all I've read about Cache, data stored in is treated as preciously as IndexedDB. The browser will not help you clean out unused entries. It's just storage.
16+
17+
P. S., markdown auto numbering, you're killing me

0 commit comments

Comments
 (0)