Commit b06263f
committed
fix: Update response_time for cached results in HybridBackend
The HybridBackend was returning the original response_time from when
the result was first cached, causing all cached queries to show the
same response time (e.g., 519.24ms) regardless of actual cache lookup speed.
This fix measures the actual cache lookup time and updates response_time
when returning cached results, showing the true performance (~1-2ms).
Before:
- Cached query: 519.24ms (always the same, from original query)
After:
- Cached query: 0.7-2ms (varies, actual cache lookup time)
This affects all backends using HybridBackend pattern:
- retraction_watch
- doaj
- crossref_analyzer
- openalex_analyzer
[AI-assisted]1 parent 67ee196 commit b06263f
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| 230 | + | |
228 | 231 | | |
229 | 232 | | |
230 | 233 | | |
| 234 | + | |
231 | 235 | | |
232 | 236 | | |
233 | 237 | | |
| |||
0 commit comments