Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-1157

Cache safe Actions results by annotating them

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • core-1.8.0
    • 1.9.0
    • Core
    • 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

            oscarbou Óscar Bou
            oscarbou Óscar Bou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: