module Bootsnap::LoadPathCache
Constants
- CACHED_EXTENSIONS
- DLEXT
- DLEXT2
-
This is nil on linux and darwin, but I think it’s ‘.o’ on some other platform. I’m not really sure which, but it seems better to replicate ruby’s semantics as faithfully as possible.
- DL_EXTENSIONS
- DOT_RB
- DOT_SO
- FALLBACK_SCAN
- SLASH
Attributes
Public Class Methods
Source
# File lib/bootsnap/load_path_cache.rb, line 31 def setup(cache_path:, development_mode:, ignore_directories:, readonly: false) unless supported? warn("[bootsnap/setup] Load path caching is not supported on this implementation of Ruby") if $VERBOSE return end store = Store.new(cache_path, readonly: readonly) @loaded_features_index = LoadedFeaturesIndex.new @load_path_cache = Cache.new(store, $LOAD_PATH, development_mode: development_mode) PathScanner.ignored_directories = ignore_directories if ignore_directories @enabled = true require_relative("load_path_cache/core_ext/kernel_require") require_relative("load_path_cache/core_ext/loaded_features") end
Source
# File lib/bootsnap/load_path_cache.rb, line 56 def supported? RUBY_ENGINE == "ruby" && RUBY_PLATFORM =~ /darwin|linux|bsd|mswin|mingw|cygwin/ end
Source
# File lib/bootsnap/load_path_cache.rb, line 48 def unload! @enabled = false @loaded_features_index = nil @realpath_cache = nil @load_path_cache = nil ChangeObserver.unregister($LOAD_PATH) end