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

Add a default compute function to the Cache interface

    Details

    • Type: Feature Request
    • Status: New (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  NadirX Tristan Tarrant
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: