In Gaffer there is one central caching service, meaning the same cache is used across all Gaffer internals, namely named operations, the job tracker and FederatedStore.

There are three types of cache we can use, JCS (Java Caching System), HazelCast or HashMap.

To implement a cache service, first we must specify the cache service class in our

# Optionally provide custom cache properties

If using an external cache service (anything found in the cache library) be sure to include the library as a dependency:


Once we have specified the the type of cache to use, Gaffer can use this cache service to store and get data to serve it more efficiently.

Please note, by default no service is loaded so if you want to make use of the cache, be sure to specify the service class in your file.

If using the Hazelcast instance of the Cache service be aware that once the last node shuts down, all data will be lost. This is due to the data being held in memory in a distributed system.

results matching ""

    No results matching ""