Commit f880712
committed
Fix: Critical cache key collision bug - include all query parameters in cache key
Previously, generateQueryCacheKey() only included a hardcoded whitelist of 11 parameters,
causing cache key collisions when different filter values were used (e.g., type=customer
vs type=contact generated the same cache key).
This fix includes ALL query parameters in the cache key generation, excluding only
internal/cache-busting parameters like '_', 'timestamp', 'nocache', and '_method'.
Impact:
- Fixes data integrity issue where different queries returned cached results from other queries
- Ensures accurate cache HIT/MISS behavior for all filter combinations
- Backward compatible - existing cache keys will naturally expire and regenerate
Example:
Before: /contacts?type=customer and /contacts?type=contact had SAME cache key
After: /contacts?type=customer and /contacts?type=contact have DIFFERENT cache keys1 parent 20c66f2 commit f880712
1 file changed
Lines changed: 14 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
74 | 71 | | |
75 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
0 commit comments