Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Callidon committed Feb 17, 2020
1 parent e5c2aba commit 3373651
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ An open-source framework for building SPARQL query engines in Javascript/Typescr
* Implements advanced *SPARQL query rewriting techniques* for transparently optimizing SPARQL query processing.
* Supports [full text search queries](#full-text-search).
* Supports [Custom SPARQL functions](#custom-functions).
* Supports [Semantic Caching](#enable-caching), to speed up query evaluation of reccurent patterns.
* Supports the [SPARQL UPDATE protocol](https://www.w3.org/TR/2013/REC-sparql11-update-20130321/).
* Supports Basic [Federated SPARQL queries](https://www.w3.org/TR/2013/REC-sparql11-federated-query-20130321/) using **SERVICE clauses**.
* Customize every step of SPARQL query processing, thanks to *a modular architecture*.
Expand All @@ -27,6 +28,7 @@ An open-source framework for building SPARQL query engines in Javascript/Typescr
* [RDF Graphs](#rdf-graphs)
* [RDF Datasets](#rdf-datasets)
* [Running a SPARQL query](#running-a-sparql-query)
* [Enable caching](#enable-caching)
* [Full text search](#full-text-search)
* [Federated SPARQL Queries](#federated-sparql-queries)
* [Custom Functions](#custom-functions)
Expand Down Expand Up @@ -188,6 +190,23 @@ Finally, to run a SPARQL query on your RDF dataset, you need to use the `PlanBui
)
```

# Enable caching

The `sparql-engine` provides support for automatic caching of Basic Graph Pattern evaluation using the [Semantic Cache algorithm](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1161590). Basically, the cache will save the results of BGPs already evaluated and, when the engine wants to evaluates a BGP, it will look for the largest subset of the BGP in the cache. If one is available, it will re-use the cached results to speed up query processing.

By default, semantic caching is disabled. You can turn it on/off using the `PlanBuilder.useCache` and `PlanBuilder.disableCache` methods, respectively. The `useCache` method accepts an optional parameter, so you can provide your own implementation of the semantic cache. By defaults, it uses an in-memory [LRU cache](https://callidon.github.io/sparql-engine/classes/lrubgpcache.html) which stores up to 500MB of items for 20 minutes.

```javascript
// get an instance of a PlanBuilder
const builder = new PlanBuilder(/* ... */)

// activate the cache
builder.useCache()

// disable the cache
builder.disableCache()
```

# Full Text Search

The `sparql-engine` provides a non-standard full text search functionnality,
Expand Down

0 comments on commit 3373651

Please sign in to comment.