MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / should_cache_driver_version

Function should_cache_driver_version

rust/src/metadata.rs:206–212  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

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).
206pub 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
214pub fn create_driver_metadata(
215 major_browser_version: &str,

Calls 1

is_emptyMethod · 0.80