ConfigBuilder
A configuration builder is a mutable version of Config
and will be implicitly converted to the latter
when passed into Producer.apply
.
Value members
Concrete methods
The file name extension to use, excluding leading period. It must only consist of letters and digits.
The file name extension to use, excluding leading period. It must only consist of letters and digits.
The default value is "cache"
.
The directory where the cached values are stored. If this directory does not exist upon cache creation, it will be created on the fly.
The directory where the cached values are stored. If this directory does not exist upon cache creation, it will be created on the fly.
By default this will lazily create a temporary directory deleted on application exit.
If this value is set via folder_=
, that setting replaces the default behavior.
Concrete fields
Acceptor function.
Given an initially found value, this function should return true
if the value is still valid,
or false
if it is invalid and should be recomputed. This function is used only once during the initial
directory scan of the producer after it is created.
Acceptor function.
Given an initially found value, this function should return true
if the value is still valid,
or false
if it is invalid and should be recomputed. This function is used only once during the initial
directory scan of the producer after it is created.
The default function always returns true
, i.e. assumes that values never become invalid.
The maximum capacity of the cache.
The maximum capacity of the cache.
The default value is Limit(-1, -1)
(unlimited capacity).
A function which is being called when an entry is evicted from cache. The function must ensure that any associated resources are disposed of.
A function which is being called when an entry is evicted from cache. The function must ensure that any associated resources are disposed of.
The default function is a no-op.
The context used by the cache to spawn future computations.
The context used by the cache to spawn future computations.
The default value is ExecutionContext.global
.
Associate resources space function. Given a value, this function should compute the size in bytes of any additional resources used by this entry.
Associate resources space function. Given a value, this function should compute the size in bytes of any additional resources used by this entry.
The default function always returns zero, i.e. assumes that there are no additional resources associated with a value.