# store

open fun store(key: BuildCacheKey, output: BuildCacheEntryWriter)(source)

Store the cache entry with the given cache key. The `writer` will be called to actually write the data.

#### Parameters

key

the cache key.

writer

the writer to write the data corresponding to the cache key.

#### Throws

org.gradle.caching.BuildCacheException

if the cache fails to store a cache entry for the given key