- Companion:
- class
Type members
Classlikes
Represents the current state of the com.stuart.zcaffeine.ZCaffeine cache builder.
Represents the current state of the com.stuart.zcaffeine.ZCaffeine cache builder.
Used in combination with State.Conflict to restrict incompatible configurations of the underlying com.github.benmanes.caffeine.cache.Caffeine builder, like configuring both max size and max weight.
Note: using ZCaffeine.fromCaffeineSpec
breaks those checks, as we don’t know for sure what has been already
configured.
- Companion:
- object
Value members
Concrete methods
Create a new ZCaffeine cache builder, preconfigured from the string representation of a CaffeineSpec
.
Compared to other variants, this can fail if the spec string is invalid.
Create a new ZCaffeine cache builder, preconfigured from the string representation of a CaffeineSpec
.
Compared to other variants, this can fail if the spec string is invalid.
Note: this variant breaks the checks offered by State & State.Conflict, as we can’t know for sure what has been already configured.
- Type parameters:
- Key
Type of the cache keys
- R
the ZIO environment used for effects interacting with the cache
- Value
Type of the cache values
- Returns:
an preconfigured ZCaffeine cache builder
Create a new ZCaffeine cache builder, preconfigured from a CaffeineSpec
.
Create a new ZCaffeine cache builder, preconfigured from a CaffeineSpec
.
Note: this variant breaks the checks offered by State & State.Conflict, as we can’t know for sure what has been already configured.
- Type parameters:
- Key
Type of the cache keys
- R
the ZIO environment used for effects interacting with the cache
- Value
Type of the cache values
- Returns:
an unconfigured ZCaffeine cache builder