api / org.gradle.caching / BuildCacheService / load

load

abstract fun load(key: BuildCacheKey, reader: BuildCacheEntryReader): Boolean

Load the cached entry corresponding to the given cache key. The reader will be called if an entry is found in the cache.

Parameters

key - the cache key.

reader - the reader to read the data corresponding to the cache key.

Exceptions

BuildCacheException - if the cache fails to load a cache entry for the given key

Return
true if an entry was found, false otherwise.