Class: PuppetLibrary::Forge::Cache

Inherits:
Proxy
  • Object
show all
Defined in:
lib/puppet_library/forge/cache.rb

Overview

A forge that proxies a remote forge. All module archives downloaded from the remote forged are cached to disk.

Instance Method Summary collapse

Methods inherited from Proxy

#get_module_buffer, #get_module_metadata, #get_module_metadata_with_dependencies, #search_modules

Constructor Details

#initialize(url, cache_dir, http_client = PuppetLibrary::Http::HttpClient.new) ⇒ Cache

  • :url - The URL of the remote forge.

  • :cache_dir - The directory in which to cache the downloaded artifacts.



28
29
30
# File 'lib/puppet_library/forge/cache.rb', line 28

def initialize(url, cache_dir, http_client = PuppetLibrary::Http::HttpClient.new)
    super(url, PuppetLibrary::Http::Cache::InMemory.new, PuppetLibrary::Http::Cache::Disk.new(cache_dir), http_client)
end