Class: BuildpackUtils::ApplicationCache

Inherits:
DownloadCache show all
Defined in:
lib/buildpack-utils/application_cache.rb

Overview

An extension of DownloadCache that is configured to use the application cache. The application cache location is defined by the second argument (ARGV[1]) to the compile script.

WARNING: This cache should only by used by code run by the compile script

Instance Method Summary collapse

Methods inherited from DownloadCache

#delete_file, #evict, #get

Constructor Details

#initializeApplicationCache

Creates an instance that is configured to use the application cache. The application cache location is defined by the second argument (ARGV[1]) to the compile script.

Raises:

  • if the second argument (ARGV[1]) to the compile script is nil



28
29
30
31
32
# File 'lib/buildpack-utils/application_cache.rb', line 28

def initialize
  application_cache_directory = ARGV[1]
  raise 'Application cache directory is undefined' if application_cache_directory.nil?
  super(application_cache_directory)
end