Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implements driver caching #104

Merged
merged 1 commit into from
May 8, 2019
Merged

implements driver caching #104

merged 1 commit into from
May 8, 2019

Conversation

titusfortner
Copy link
Owner

This creates a #{driver_path}.version file, and we read its modified date on the first lookup. There might still be a race condition, but I think it'll solve #77 well enough?

The idea is to set the default value in 3.x to 0, but allow people to set it if they want.
Then 4.x will be set by default to 1 day (86_400)

Note that for Chrome if a major browser version update has happened, it will ignore the cache, so effectively this is only preventing using a newer point release up to the expiration of the cache_time

@@ -120,7 +124,7 @@ def sufficient_binary?
end

def normalize_version(version)
Gem::Version.new(version.to_s)
Gem::Version.new(version.nil? ? nil : version.to_s)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version&.to_s

@titusfortner titusfortner merged commit 5bb5b6b into master May 8, 2019
@titusfortner titusfortner mentioned this pull request May 8, 2019
@kapoorlakshya kapoorlakshya deleted the caching branch June 4, 2019 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants