This method is only available on newer versions.
The first available version (v2_6_3) is shown here.
cache_globally(spec, local_cache_path)
private
Checks if the requested spec exists in the global cache. If it does not, we
create the relevant global cache subdirectory if it
does not exist and copy the spec from the local cache to the global cache.
# File lib/bundler/source/rubygems.rb, line 504
def cache_globally(spec, local_cache_path)
return unless cache_path = download_cache_path(spec)
return if cache_path.exist?
SharedHelpers.filesystem_access(cache_path.dirname, &:mkpath)
SharedHelpers.filesystem_access(cache_path) do
FileUtils.cp(local_cache_path, cache_path)
end
end