You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (JIRA)" <ji...@apache.org> on 2017/02/21 10:40:44 UTC

[jira] [Resolved] (SLING-6534) Optionally cache results of ValidationService.validate(Resource, ValidationModel) and expose the cached result via an AdapterFactory

     [ https://issues.apache.org/jira/browse/SLING-6534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konrad Windszus resolved SLING-6534.
------------------------------------
    Resolution: Fixed

Fixed in [r1783249|http://svn.apache.org/r1783249]. The caching must be enabled explicitly via an OSGi configuration. The cached result is exposed via {{Resource.adaptTo(ValidationResult.class)}} in case caching is enabled and there has been a validation previously triggered on the same resource.

> Optionally cache results of ValidationService.validate(Resource, ValidationModel) and expose the cached result via an AdapterFactory
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-6534
>                 URL: https://issues.apache.org/jira/browse/SLING-6534
>             Project: Sling
>          Issue Type: Improvement
>          Components: Validation
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>             Fix For: Validation 1.0.0
>
>
> At least for the Sling Validation being triggered from the ModelAdapterFactory it would be beneficial to be able to look up the result of the last validation of a specific resource in a cache. That is especially useful when exceptions cannot be used to propagate this information to a different place in the code (e.g. to a Servlet filter). A concrete use case for this is SLING-6531 where the cached result is accessible even if all failures are below the threshold.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)