Package liquibase.util
Class Cache<T>
java.lang.Object
liquibase.util.Cache<T>
A wrapper around a method which is expected to be called multiple times. This class orchestrates ensuring that the
method is called once and storing the result value for subsequent executions, with support for time-to-live (TTL).
Some of the logic in this class is borrowed from the Guava implementation of ExpiringMemoizingSupplier:
https://github.com/google/guava/blob/cc2c5d3d6623fe66a969c29fcb422bf02fb57a1f/guava/src/com/google/common/base/Suppliers.java#L286-L346
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Cache
-
Cache
-
Cache
-
-
Method Details
-
get
- Throws:
Exception
-
clearCache
public void clearCache()Clears the cache and resets its state.
-