Skip to main content

get_cached_regex

Function get_cached_regex 

Source
pub fn get_cached_regex(pattern: &str) -> Result<Arc<Regex>, Error>
Expand description

Get a regex from the global cache

If the mutex is poisoned (another thread panicked while holding the lock), this function recovers by clearing the cache and continuing. This ensures the library never panics due to mutex poisoning.