Guava cache supplier extension to memoize exceptions, fallback, expiration control.
Use ThrowingSupplier
to memoize exceptions with Guava lazy-load / cache supplier, when failing after N attempts.
Exception thrown from your supplier will be raised when accessing memoized data.
Use LastValueFallbackSupplier
for to memoize last non-throwing value when exception are raised by your supplier.
Exception thrown from your supplier will be catched when accessing memoized data, and last non-throwing value will be returned. If there is no such value, Exception will be raised.
Force ExpiringMemoizingSupplier expiration.
Install with Maven or Gradle from JitPack
See JavaExample.java
Java >= 6