lib/liberty_buildpack/util/cache/download_cache.rb
def from_mutable_cache(uri)
          cached_file = CachedFile.new @mutable_cache_root, uri, true
          cached      = update URI(uri), cached_file
          [cached_file, cached]
        rescue => e
          @logger.warn { "Unable to download #{uri.sanitize_uri} into cache #{@mutable_cache_root}: #{e.message}" }
          nil
        end
# Creates an instance of the cache that is backed by a number of filesystem locations.  The first argument
# (+mutable_cache_root+) is the only location that downloaded files will be stored in.
#
# @param [Pathname] mutable_cache_root the filesystem location in which find cached files in.  This will also be
#                                      the location that all downloaded files are written to.
# @param [Pathname] immutable_cache_roots other filesystem locations to find cached files in.  No files will be
#                                         written to these locations.
Creates an instance of the cache that is backed by a number of filesystem locations.  The first argument
(+mutable_cache_root+) is the only location that downloaded files will be stored in.
Creates an instance of the cache that is backed by a number of filesystem locations . The first argument ( + mutable_cache_root + ) is the only location that downloaded files will be stored in .
def from_mutable_cache(uri)
          cached_file = CachedFile.new @mutable_cache_root, uri, true
          cached      = update URI(uri), cached_file
          [cached_file, cached]
        rescue => e
          @logger.warn { "Unable to download #{uri.sanitize_uri} into cache #{@mutable_cache_root}: #{e.message}" }
          nil
        end
def from_mutable_cache ( uri ) cached_file = CachedFile . new @mutable_cache_root , uri , true cached = update URI ( uri ) , cached_file [ cached_file , cached ] rescue => e @logger . warn { "Unable to download #{uri.sanitize_uri} into cache #{@mutable_cache_root}: #{e.message}" } nil end
Creates an instance of the cache that is backed by a number of filesystem locations.
Creates an instance of the cache that is backed by a number of filesystem locations .
uri
immutable_cache_roots other filesystem locations to find cached files in. No files will be written to these locations.
immutable_cache_roots other filesystem locations to find cached files in . No files will be written to these locations .