You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/extending-caches.md
+2-14Lines changed: 2 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Caches
2
-
Many components will want to cache large files that are downloaded for applications. The buildpack provides a cache abstraction to encapsulate this caching behavior. The cache abstraction is comprised of three cache types each with the same signature.
2
+
Many components will want to cache large files that are downloaded for applications. The buildpack provides a cache abstraction to encapsulate this caching behavior. The cache abstraction is comprised of two cache types each with the same signature.
3
3
4
4
```ruby
5
5
# Retrieves an item from the cache. Retrieval of the item uses the following algorithm:
@@ -48,7 +48,7 @@ Caching can be configured by modifying the [`config/cache.yml`][] file in the bu
48
48
| `remote_downloads` | This property can take the value `enabled` or `disabled`. <p>The default value of `enabled` means that the buildpack will check the internet connection and remember the result for the remainder of the buildpack invocation. If the internet is available, it will then be used to download files. If the internet is not available, cache will be consulted instead. <p>Alternatively, the property may be set to `disabled` which avoids the check for an internet connection, does not attempt downloads, and consults the cache instead.
49
49
50
50
## `JavaBuildpack::Util::Cache::DownloadCache`
51
-
The [`DownloadCache`][] is the most generic of the three caches. It allows you to create a cache that persists files any that write access is available. The constructor signature looks the following:
51
+
The [`DownloadCache`][] is the most generic of the two caches. It allows you to create a cache that persists files any that write access is available. The constructor signature looks the following:
52
52
53
53
```ruby
54
54
# Creates an instance of the cache that is backed by the filesystem rooted at +cache_root+
@@ -68,19 +68,7 @@ The [`ApplicationCache`][] is a cache that persists files into the application c
68
68
definitialize
69
69
```
70
70
71
-
## `JavaBuildpack::Util::Cache::GlobalCache`
72
-
The [`GlobalCache`][] is a cache that persists files into the global cache passed to all scripts. It examines `ENV['BUILDPACK_CACHE']` for the cache location and configures itself accordingly.
73
-
74
-
```ruby
75
-
# Creates an instance that is configured to use the global cache. The global cache location is defined by the
76
-
# +BUILDPACK_CACHE+ environment variable
77
-
#
78
-
#@raise if the +BUILDPACK_CACHE+ environment variable is +nil+
0 commit comments