{@code CacheBuilderSpec} supports parsing configuration off of a string, whichmakes it especially useful for command-line configuration of a {@code CacheBuilder}.
The string syntax is a series of comma-separated keys or key-value pairs, each corresponding to a {@code CacheBuilder} method.
The set of supported keys will grow as {@code CacheBuilder} evolves, but existing keyswill never be removed.
Durations are represented by an integer, followed by one of "d", "h", "m", or "s", representing days, hours, minutes, or seconds respectively. (There is currently no syntax to request expiration in milliseconds, microseconds, or nanoseconds.)
Whitespace before and after commas and equal signs is ignored. Keys may not be repeated; it is also illegal to use the following pairs of keys in a single value:
{@code CacheBuilderSpec} does not support configuring {@code CacheBuilder} methodswith non-value parameters. These must be configured in code.
A new {@code CacheBuilder} can be instantiated from a {@code CacheBuilderSpec} using{@link CacheBuilder#from(CacheBuilderSpec)} or {@link CacheBuilder#from(String)}. @author Adam Winer @since 12.0
|
|
|
|
|
|
|
|
|
|
|
|