@ J2ObjCIncompatible @ GwtIncompatible // java.time.Duration @ SuppressWarnings ( "GoodTime" ) // java.time.Duration decomposition public CacheBuilder < K , V > expireAfterWrite ( java . time . Duration duration ) { return expireAfterWrite ( duration . toNanos ( ) , TimeUnit . NANOSECONDS ) ; }
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry s creation or the most recent replacement of its value .