[
https://issues.apache.org/jira/browse/SLING-10118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17331904#comment-17331904
]
Radu Cotescu commented on SLING-10118:
--------------------------------------
[~bdelacretaz], I like this approach more. A {{Resource}} object should not be
cached at all and I think there are hints about this in the
{{ResourceProvider}} API. The main reason for that is that its associated
{{ResourceResolver}} can be closed. Another thing is the resource metadata,
which could technically change if the system is reconfigured (e.g. new mapping
info or aliases).
> Fully cache the GraphQLSchema objects
> -------------------------------------
>
> Key: SLING-10118
> URL: https://issues.apache.org/jira/browse/SLING-10118
> Project: Sling
> Issue Type: Bug
> Components: GraphQL
> Affects Versions: GraphQL Core 0.0.10
> Reporter: Thierry Ygé
> Priority: Major
>
> Currently in SLING-10085 the GraphQLSchema couldn't be cached due to wired
> resource.
> Thus it still need half the time to spend on building the schema, while
> generally the resource is only used to be passed later to the fetcher. As
> that resource then change, I suggested to wrap it via a proxy Resource
> implementation that would be passed instead of the real resource.
> That proxy will then use a map to lookup for the current resource used at
> execute/validate time. The key for the map is to use the current thread.
> I will submit a PR with the solution I suggest to use.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)