@@ -109,22 +109,30 @@ export const queryClient = new QueryClient({
109109
110110``` mermaid
111111flowchart TD
112- Application([Client app]) --> |".setItem()"| IDBCache[[IDBCache]]
113- IDBCache -.-> |"Unencrypted chunks"| WebWorker{{Web Worker}}
114- WebWorker -.-> |"Encrypted chunks"| IDBCache
115- IDBCache -.-> |"Encrypted chunks"| IndexedDB[(IndexedDB)]
112+ subgraph Browser["Browser"]
113+ IDBCache[["IDBCache"]]
114+ Application(["Client app"])
115+ WebWorker{{"Web Worker"}}
116+ IndexedDB[("IndexedDB")]
117+ end
118+ Application -- ".setItem()" --> IDBCache
119+ IDBCache -. Unencrypted chunks .-> WebWorker
120+ WebWorker -. Encrypted chunks .-> IDBCache
121+ IDBCache -. Encrypted chunks .-> IndexedDB
116122```
117123
118124### getItem
119125
120126``` mermaid
121127flowchart TD
128+ subgraph Browser["Browser"]
122129 Application([Client app]) --> |".getItem()"| IDBCache[[IDBCache]]
123130 IDBCache --> |Get chunks| IndexedDB[(IndexedDB)]
124131 IndexedDB -.-> |Encrypted chunks| IDBCache
125132 IDBCache -.-> |Encrypted chunks| WebWorker{{Web Worker}}
126133 WebWorker -.-> |Decrypted chunks| IDBCache
127134 IDBCache --> |"Item"| Application
135+ end
128136```
129137
130138## Technologies used
@@ -145,4 +153,4 @@ flowchart TD
145153
146154- [ Is postMessage slow?] ( https://surma.dev/things/is-postmessage-slow/ )
147155- [ Measure performance with the RAIL model] ( https://web.dev/articles/rail )
148- - [ LocalStorage vs. IndexedDB vs. Cookies vs. OPFS vs. WASM-SQLite] ( https://rxdb.info/articles/localstorage-indexeddb-cookies-opfs-sqlite-wasm.html )
156+ - [ LocalStorage vs. IndexedDB vs. Cookies vs. OPFS vs. WASM-SQLite] ( https://rxdb.info/articles/localstorage-indexeddb-cookies-opfs-sqlite-wasm.html )
0 commit comments