Determines whether a discovered driver version should be written to the metadata cache. Returns `false` when the TTL is zero, the major browser version is empty, or the driver version itself is empty (e.g. a version-less HTTP response).
(
driver_ttl: u64,
major_browser_version: &str,
driver_version: &str,
)
| 204 | /// Returns `false` when the TTL is zero, the major browser version is empty, or the |
| 205 | /// driver version itself is empty (e.g. a version-less HTTP response). |
| 206 | pub fn should_cache_driver_version( |
| 207 | driver_ttl: u64, |
| 208 | major_browser_version: &str, |
| 209 | driver_version: &str, |
| 210 | ) -> bool { |
| 211 | driver_ttl > 0 && !major_browser_version.is_empty() && !driver_version.is_empty() |
| 212 | } |
| 213 | |
| 214 | pub fn create_driver_metadata( |
| 215 | major_browser_version: &str, |