Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Python
/
lru_cache function caching
What does lru_cache thread safety guarantee for two concurrent calls with the same cold k…
from lru_cache function caching
Python 3.14
intermediate
1 min
What does lru_cache thread safety guarantee for two concurrent calls with the same cold key?
The original function is guaranteed to run exactly once.
The cache data remains coherent, but the original function may run more than once.
One call always raises RuntimeError.
Both calls bypass the cache permanently.
Check
Ask AI about this kata
Report an error
previous kata
Spot the bug in the LRU cache
Spot the bug
A new version is available
Reload