[ 
https://issues.apache.org/jira/browse/JENA-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14963879#comment-14963879
 ] 

ASF GitHub Bot commented on JENA-626:
-------------------------------------

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

    https://github.com/apache/jena/pull/95#discussion_r42413334
  
    --- Diff: 
jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cache/CacheEntry.java
 ---
    @@ -0,0 +1,57 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.jena.fuseki.cache;
    +
    +
    +import org.apache.jena.sparql.resultset.SPARQLResult;
    +
    +public class CacheEntry {
    --- End diff --
    
    My inclination would actually be to make this type as immutable as 
possible. If I am right in understanding that `result` must always be set, then 
make `result` `final`, have the constructor set it, and be done with it. If 
`cacheBuilder` may or may not be set, leave it mutable, and provide a mutator 
and a flag to show whether it has been set.Of course, this all deserves 
reconsideration in light of the advice @afs has given about architectural 
issues. You may want to have this type contain very different state or even 
wrap a computation instead of values.


> SPARQL Query Caching
> --------------------
>
>                 Key: JENA-626
>                 URL: https://issues.apache.org/jira/browse/JENA-626
>             Project: Apache Jena
>          Issue Type: Improvement
>            Reporter: Andy Seaborne
>              Labels: java, linked_data, rdf, sparql
>
> Add a caching layer to Fuseki to cache the results of SPARQL Query requests.  
> This cache should allow for in-memory and disk-based caching, configuration 
> and cache management, and coordination with data modification.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to