Skip to content

Commit 9e80f44

Browse files
committed
Add data flow to README
1 parent 9db572d commit 9e80f44

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,27 @@ export const queryClient = new QueryClient({
105105
},
106106
});
107107
```
108+
109+
## Data flow
110+
111+
### setItem
112+
113+
```mermaid
114+
flowchart TD
115+
Application([Client app]) --> |".setItem()"| IDBCache[[IDBCache]]
116+
IDBCache -.-> |"Unencrypted chunks"| WebWorker{{Web Worker}}
117+
WebWorker -.-> |"Encrypted chunks"| IDBCache
118+
IDBCache -.-> |"Encrypted chunks"| IndexedDB[(IndexedDB)]
119+
```
120+
121+
### getItem
122+
123+
```mermaid
124+
flowchart TD
125+
Application([Client app]) --> |".getItem()"| IDBCache[[IDBCache]]
126+
IDBCache --> |Get chunks| IndexedDB[(IndexedDB)]
127+
IndexedDB -.-> |Encrypted chunks| IDBCache
128+
IDBCache -.-> |Encrypted chunks| WebWorker{{Web Worker}}
129+
WebWorker -.-> |Decrypted chunks| IDBCache
130+
IDBCache --> |"Item"| Application
131+
```

0 commit comments

Comments
 (0)