Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-1157

Cache safe Actions results by annotating them

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: core-1.8.0
    • Fix Version/s: 1.9.0
    • Component/s: Core
    • Labels:
      None

      Description

      As discussed on the Isis mailing list [1].

      Currently, there's service called QueryResultsCache [2] that allows to cache the results of an Action/method invocation.

      We want to introduce this capability for Safe Actions by simply annotating them.

      Current proposal is to extend the "SemanticsOf" annotation param with a new type: SemanticsOf.SAFE_AND_REQUEST_CACHED

      A usage example would be:

          @Override
          @Action(semantics = SemanticsOf.SAFE_AND_REQUEST_CACHED)
          public SortedSet<IESG> relevantSnpGenotypes(final IE inputElement,
                  final Kit kit) {
              if (kit != null) {
                  return kit.findAllAssociatedSNPGenotypesForInputElement(inputElement, AlgorithmImplementation.this.IESGClass);
              } else {
                  return Sets.newTreeSet();
              }
          }
      
      

      [1] http://mail-archives.apache.org/mod_mbox/isis-users/201505.mbox/%3C575DA9CB-14E6-4DD0-9565-C03C759BD20E@gesconsultor.com%3E

      [2] https://isis.apache.org/reference/services/query-results-cache.html

        Attachments

          Activity

            People

            • Assignee:
              oscarbou Oscar Bou
              Reporter:
              oscarbou Oscar Bou
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: