Class Cache
java.lang.Object
org.springframework.boot.buildpack.platform.build.Cache
- Direct Known Subclasses:
Cache.Bind
,Cache.Volume
Details of a cache for use by the CNB builder.
- Since:
- 2.6.0
- Author:
- Scott Frederick
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Details of a cache stored in a bind mount.static enum
The format of the cache.static class
Details of a cache stored in a Docker volume. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Cache
Create a newCache
that uses a bind mount with the provided source.boolean
getBind()
Return the details of the cache if it is a bind cache.Return the details of the cache if it is a volume cache.int
hashCode()
static Cache
Create a newCache
that uses a volume with the provided name.static Cache
volume
(VolumeName name) Create a newCache
that uses a volume with the provided name.
-
Field Details
-
format
-
-
Method Details
-
getVolume
Return the details of the cache if it is a volume cache.- Returns:
- the cache, or
null
if it is not a volume cache
-
getBind
Return the details of the cache if it is a bind cache.- Returns:
- the cache, or
null
if it is not a bind cache
-
volume
Create a newCache
that uses a volume with the provided name.- Parameters:
name
- the cache volume name- Returns:
- a new cache instance
-
volume
Create a newCache
that uses a volume with the provided name.- Parameters:
name
- the cache volume name- Returns:
- a new cache instance
-
bind
Create a newCache
that uses a bind mount with the provided source.- Parameters:
source
- the cache bind mount source- Returns:
- a new cache instance
-
equals
-
hashCode
public int hashCode()
-