[ https://issues.apache.org/jira/browse/JENA-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15254526#comment-15254526 ]
ASF GitHub Bot commented on JENA-626: ------------------------------------- Github user osma commented on the pull request: https://github.com/apache/jena/pull/95#issuecomment-213564399 @ajs6f said: > If Jena is going to do really useful caching, it's going to be caching something other than bits, something specific to what Jena does, like node-tuples or result rows or the like. There are indeed some things a Jena-specific cache can do better than a general purpose cache such as Varnish. Many have already been mentioned, but to recap: 1. The cache can be aware of changes in the underlying data and keep responses "forever", but invalidate them immediately when data changes. An external cache has to be manually purged. (Supporting ETag, Last-Modified, conditional GETs etc. would help automatically invalidate an external cache though) 2. If the cache is on a ResultSet level, things like providing different serializations for the same result and paging become possible. 3. The cache can be aware of the cost of executing the query. Holding on to a result that can be recalculated from the data in 5ms is basically a waste of memory. Perhaps the cache, when it has to evict older results, could prefer keeping results that took a long time to generate. Or there could be a threshold that determines what to cache - e.g. don't keep anything that was generated in less than 10ms. 4. An external cache is always more infrastructure to set up and maintain, and configuring a general purpose HTTP proxy is not exactly trivial. Even if I intend to use Varnish in production, this kind of integrated cache could be very useful in development and testing. Just a single setting could give a noticeable performance boost to Fuseki. > SPARQL Query Caching > -------------------- > > Key: JENA-626 > URL: https://issues.apache.org/jira/browse/JENA-626 > Project: Apache Jena > Issue Type: Improvement > Reporter: Andy Seaborne > Assignee: Saikat Maitra > 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)