Package org.codehaus.groovy.runtime.memoize

# Interface FlexibleEvictableCache<K,V>

All Superinterfaces:
  `EvictableCache<K,V>`, `Map<K,V>`, `MemoizeCache<K,V>`

All Known Implementing Classes:
  `CommonCache`, `ConcurrentCommonCache`, `ConcurrentSoftCache`, `StampedCommonCache`

public interface FlexibleEvictableCache<K,V> extends EvictableCache<K,V>
An EvictableCache supporting a getAndPut variant with additional control over caching.

Since:
  5.0.0

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.codehaus.groovy.runtime.memoize.EvictableCache

  `EvictableCache.Action<K,V,R>, EvictableCache.EvictionStrategy`

  ## Nested classes/interfaces inherited from interface java.util.Map

  `Map.Entry<K extends Object,V extends Object>`

  ## Nested classes/interfaces inherited from interface org.codehaus.groovy.runtime.memoize.MemoizeCache

  `MemoizeCache.ValueProvider<K,V>`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `V`
  `getAndPut(K key, MemoizeCache.ValueProvider<? super K,? extends V> valueProvider, boolean shouldCache)`

  ### Methods inherited from interface org.codehaus.groovy.runtime.memoize.EvictableCache

  `clear, clearAll, containsKey, keys, remove, size, values`

  ### Methods inherited from interface java.util.Map

  `compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, replace, replace, replaceAll`

  ### Methods inherited from interface org.codehaus.groovy.runtime.memoize.MemoizeCache

  `cleanUpNullReferences, get, getAndPut, put`

- ## Method Details

  - ### getAndPut

    V getAndPut(K key, MemoizeCache.ValueProvider<? super K,? extends V> valueProvider, boolean shouldCache)