Commit f9e9f6e
perf(cache): stable cache keys and graceful shutdown fix (#95)
- Use JSON.stringify with replacer for stable key ordering
This preserves JSON.stringify semantics (Date.toJSON, undefined omission,
etc.) while ensuring {a:1, b:2} and {b:2, a:1} produce the same cache key
- Call unref() on cleanup interval so it doesn't prevent graceful shutdown
Without this, the hourly interval keeps the Node.js event loop alive
even when the server is trying to shut down
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <[email protected]>1 parent 025e691 commit f9e9f6e
1 file changed
+30
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
29 | 53 | | |
30 | 54 | | |
| 55 | + | |
31 | 56 | | |
32 | 57 | | |
33 | 58 | | |
34 | 59 | | |
35 | 60 | | |
36 | | - | |
| 61 | + | |
37 | 62 | | |
38 | 63 | | |
39 | 64 | | |
| |||
212 | 237 | | |
213 | 238 | | |
214 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
215 | 244 | | |
216 | 245 | | |
217 | 246 | | |
| |||
0 commit comments