Package org.gradle.caching
Class MapBasedBuildCacheService
java.lang.Object
org.gradle.caching.MapBasedBuildCacheService
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- BuildCacheService
Simple build cache implementation that delegates to a 
ConcurrentMap.- Since:
- 3.5
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Clean up any resources held by the cache once it's not used anymore.booleanload(BuildCacheKey key, BuildCacheEntryReader reader) Load the cached entry corresponding to the given cache key.voidstore(BuildCacheKey key, BuildCacheEntryWriter output) Store the cache entry with the given cache key.
- 
Constructor Details- 
MapBasedBuildCacheService
 
- 
- 
Method Details- 
loadDescription copied from interface:BuildCacheServiceLoad the cached entry corresponding to the given cache key. Thereaderwill be called if an entry is found in the cache.- Specified by:
- loadin interface- BuildCacheService
- Parameters:
- key- the cache key.
- reader- the reader to read the data corresponding to the cache key.
- Returns:
- trueif an entry was found,- falseotherwise.
- Throws:
- BuildCacheException- if the cache fails to load a cache entry for the given key
 
- 
storeDescription copied from interface:BuildCacheServiceStore the cache entry with the given cache key. Thewriterwill be called to actually write the data.- Specified by:
- storein interface- BuildCacheService
- Parameters:
- key- the cache key.
- output- the writer to write the data corresponding to the cache key.
- Throws:
- BuildCacheException- if the cache fails to store a cache entry for the given key
 
- 
closeDescription copied from interface:BuildCacheServiceClean up any resources held by the cache once it's not used anymore.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- BuildCacheService
- Specified by:
- closein interface- Closeable
- Throws:
- IOException- if the cache fails to close cleanly.
 
 
-