Class | Gem::SourceInfoCache |
In: |
lib/rubygems/source_info_cache.rb
|
Parent: | Object |
SourceInfoCache stores a copy of the gem index for each gem source.
There are two possible cache locations, the system cache and the user cache:
Once a cache is selected, it will be used for all operations. SourceInfoCache will not switch between cache files dynamically.
Cache data is a Hash mapping a source URI to a SourceInfoCacheEntry.
Search all source indexes for pattern. Only returns gems matching Gem.platforms when only_platform is true. See search_with_source.
Searches all source indexes for pattern. If only_platform is true, only gems matching Gem.platforms will be selected. Returns an Array of pairs containing the Gem::Specification found and the source_uri it was found at.
Set the source info cache data directly. This is mainly used for unit testing when we don‘t want to read a file system to grab the cached source index information. The hash should map a source URL into a SourceInfoCacheEntry.