You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by afs <gi...@git.apache.org> on 2017/08/23 18:06:29 UTC

[GitHub] jena pull request #274: JENA-1381: Use all information in the cache key (tex...

Github user afs commented on a diff in the pull request:

    https://github.com/apache/jena/pull/274#discussion_r134827626
  
    --- Diff: jena-text/src/main/java/org/apache/jena/query/text/TextQueryPF.java ---
    @@ -240,6 +240,36 @@ private QueryIterator concreteSubject(Binding binding, Node s, Node score, Node
         }
     
         private ListMultimap<String,TextHit> query(Node property, String queryString, String lang, int limit, ExecutionContext execCxt) {
    +        String graphURI = chooseGraphURI(execCxt);
    +        
    +        if ( graphURI == null ) {
    +            Explain.explain(execCxt.getContext(), "Text query: "+queryString) ;
    +            if ( log.isDebugEnabled())
    +                log.debug("Text query: {} ({})", queryString,limit) ;
    +        } else {
    +            Explain.explain(execCxt.getContext(), "Text query <"+graphURI+">: "+queryString) ;
    +            if ( log.isDebugEnabled())
    +                log.debug("Text query: {} <{}> ({})", queryString, graphURI, limit) ;
    +        }
    +        
    +        // Cache-key does not matter if lang or graphURI are null
    +        String cacheKey = limit + " " + property + " " + queryString + " " + lang + " " + graphURI ;
    --- End diff --
    
    @osma If you have a moment, please could you check I haven't misunderstood the design here and that changing the cache-key will not cause other problems.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---