Class: BuildpackSupport::Cache::ApplicationCache

Inherits:
DownloadCache show all
Defined in:
lib/buildpack_support/cache/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

Constant Summary

Constants inherited from DownloadCache

DownloadCache::CACHED_RESOURCES_DIRECTORY

Instance Method Summary collapse

Methods inherited from DownloadCache

#evict, #get

Methods included from DirectoryFinder

#load_path_peer

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



32
33
34
35
36
# File 'lib/buildpack_support/cache/application_cache.rb', line 32

def initialize
  application_cache_directory = ARGV[1]
  fail 'Application cache directory is undefined' if application_cache_directory.nil?
  super(Pathname.new(application_cache_directory), CACHED_RESOURCES_DIRECTORY)
end