public final class Memoizer extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Supplier<T> |
memoizeWithExpiration(Supplier<T> base,
Duration duration)
Memoize a supplier with expiration.
|
public static <T> Supplier<T> memoizeWithExpiration(Supplier<T> base, Duration duration)
T - The return type of the supplier.base - The supplier to memoize.duration - The cache duration. Accurate to the nearest millisecond.Copyright © 2019. All rights reserved.