When {@code size} is zero, elements will be evicted immediately after being loaded into thecache. This has the same effect as invoking {@link #expireAfterWrite expireAfterWrite}{@code (0, unit)} or {@link #expireAfterAccess expireAfterAccess}{@code (0,unit)}. It can be useful in testing, or to disable caching temporarily without a code change. @param size the maximum size of the cache @throws IllegalArgumentException if {@code size} is negative @throws IllegalStateException if a maximum size was already set
|
|