Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-5189

Add a default compute function to the Cache interface

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • Core
    • None

      Java 8 has extended the Map interface with computeIfAbsent and putIfAbsent methods to support memoization. We could take this one step further by allowing setting a default mapping function using the Function<? super K,? extends V> signature so that invoking a get operation on a non-existent or expired entry will compute it and store it in the cache.

            Unassigned Unassigned
            ttarrant@redhat.com Tristan Tarrant
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: