Class Cache<T>

java.lang.Object
liquibase.util.Cache<T>

public class Cache<T> extends Object
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.
  • Constructor Details

    • Cache

      public Cache(Callable<T> generator)
    • Cache

      public Cache(Callable<T> generator, boolean exceptionIsPermitted)
  • Method Details

    • get

      public T get() throws Exception
      Throws:
      Exception
    • clearCache

      public void clearCache()