Rdf4j-Spring ResultCacheAutomatically configures a cache for Rdf4J query results via the
If enabled, the
Rdf4JConfig wraps the
CachingRepositoryConnections. These return
ResultCachingTupleQuery wrappers when
instantiating queries. The
ResultCaching(Tuple|Graph)Query returns a
Reusable(Tuple|Graph)QueryResult, which records the
results as they are read by the client code and keeps them for future use.
There are two levels of caching: connection-level and global. The connection-level cache is cleared when the connection is closed (or returned to the pool, if pooling is enabled). The global cache is cleared whenever data is written to the repostitory by the application.
Note: global result caching is disabled by default. The reason is that in the general case, we cannot be sure
that no other application writes to the repository. If you are really sure that your application is the only
one writing to the repository, or if the repository is read-only, you can enable the global result cache using
For More information on configuration, see
- Florian Kleedorfer
ClassDescriptionUpdate that, upon each invocation of
execute(), clears the result cache it is aware of.ResultCache<K,
T>Wrapper for a TupleQueryResult, allowing the result to be replayed.Wrapper for a TupleQueryResult, allowing the result to be replayed.