[
https://issues.apache.org/jira/browse/ISIS-1157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14642392#comment-14642392
]
ASF subversion and git services commented on ISIS-1157:
-------------------------------------------------------
Commit c67e372f00e9fe6a91aff70bb1f5b6330cb9126d in isis's branch
refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=c67e372 ]
ISIS-1157: simplified design for SAFE_AND_REQUEST_CACHEABLE.
Instead add the caching to ActionInvocationFacetForDomainEventAbstract. No
need for a new facet, just use the value of ActionSemanticsFacet.
Also:
- introduce new #isSafeInNature() to the SemanticsOf enum (also the deprecated
equivalent ActionSemantics enum), which incorporates both #SAFE and
#SAFE_AND_REQUEST_CACHEABLE
- go through codebase and change any hardcoded comparisons with
SemanticsOf.SAFE (also the deprecated equivalent ActionSemantics enum) to use
SemanticsOf#isSafeInNature() instead
- whether an action is bookmarkable
- whether concurrency checking should be performed
- a couple of uses in Restful Objects
- deprecate old #isSafe() method, since is potentially confusing
> Cache safe Actions results by annotating them
> ---------------------------------------------
>
> Key: ISIS-1157
> URL: https://issues.apache.org/jira/browse/ISIS-1157
> Project: Isis
> Issue Type: Improvement
> Components: Core
> Affects Versions: core-1.8.0
> Reporter: Oscar Bou
> Assignee: Oscar Bou
> Fix For: 1.9.0
>
>
> 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:
>
> {code}
> @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();
> }
> }
> {code}
> [1]
> http://mail-archives.apache.org/mod_mbox/isis-users/201505.mbox/%[email protected]%3E
> [2] https://isis.apache.org/reference/services/query-results-cache.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)