Commit 9a5507d
committed
Fix object-cache drop-in removal when Redis constants are commented out
- Use wp-cli/wp-config-transformer to detect Redis config in wp-config.php
so commented-out defines are not treated as present (drop-in was defining
WP_REDIS_PREFIX from env/WP_CACHE_KEY_SALT, so is_available() stayed true)
- Add is_configured_in_wp_config() and use it in maybe_remove_dropin_if_unavailable
instead of is_available()
- Performance: check for drop-in file first so wp-config is only read when
the drop-in exists; cache is_configured_in_wp_config() result per request
- Add wp-cli/wp-config-transformer ^1.4 dependency1 parent 80104a8 commit 9a5507d
File tree
4 files changed
+113
-61
lines changed- includes
- Cache/Types
4 files changed
+113
-61
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
| 61 | + | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
66 | 104 | | |
67 | 105 | | |
68 | 106 | | |
| |||
305 | 343 | | |
306 | 344 | | |
307 | 345 | | |
308 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
309 | 349 | | |
310 | 350 | | |
311 | 351 | | |
312 | 352 | | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | 353 | | |
317 | 354 | | |
318 | 355 | | |
319 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
320 | 360 | | |
321 | 361 | | |
322 | 362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
149 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
150 | 161 | | |
151 | 162 | | |
152 | 163 | | |
| |||
0 commit comments