code: @GwtIncompatible // To be supported (synchronously).
    public CacheBuilder<K, V> refreshAfterWrite(long duration, TimeUnit unit) {
      checkNotNull(unit);
      checkState(refreshNanos == UNSET_INT, "refresh was already set to %s ns", refreshNanos);
      checkArgument(duration > 0, "duration must be positive: %s %s", duration, unit);
      this.refreshNanos = unit.toNanos(duration);
      return this;
    }
docs: Specifies that active entries are eligible for automatic refresh once a fixed duration has
  elapsed after the entry's creation, or the most recent replacement of its value. The semantics
  of refreshes are specified in {@link LoadingCache#refresh}, and are performed by calling
  {@link CacheLoader#reload}.
  
  <p>As the default implementation of {@link CacheLoader#reload} is synchronous, it is
  recommended that users of this method override {@link CacheLoader#reload} with an asynchronous
  implementation; otherwise refreshes will be performed during unrelated cache read and write
  operations.
  
  <p>Currently automatic refreshes are performed when the first stale request for an entry
  occurs. The request triggering refresh will make a blocking call to {@link CacheLoader#reload}
  and immediately return the new value if the returned future is complete, and the old value
  otherwise.
  
  <p><b>Note:</b> <i>all exceptions thrown during refresh will be logged and then swallowed</i>.
  
  @param duration the length of time after an entry is created that it should be considered
  stale, and thus eligible for refresh
  @param unit the unit that {@code duration} is expressed in
  @return this {@code CacheBuilder} instance (for chaining)
  @throws IllegalArgumentException if {@code duration} is negative
  @throws IllegalStateException if the refresh interval was already set
  @since 11.0