Commit 3e22061
committed
fix: sync IAppConfig cache when CA ID is empty
When getCaId() finds an empty CA ID in cache, it now calls
clearCache(true) to reload from database before generating a new one.
This prevents race conditions in test environments where CLI commands
and HTTP requests may execute simultaneously with independent caches.
The solution is simpler than using file locks and works transparently
in both test and production environments with minimal overhead.
Signed-off-by: Vitor Mattos <[email protected]>1 parent c644aaf commit 3e22061
1 file changed
Lines changed: 2 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | 146 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 147 | + | |
186 | 148 | | |
| 149 | + | |
187 | 150 | | |
188 | 151 | | |
189 | 152 | | |
| |||
0 commit comments