Caching
Flow ships out-of-the box with a full production-grade Hazelcast cache.
Cache requests
By default, Flow will cache requests throughout a query only. In other words, Flow will only call a service with the same set of parameters once within a query. However, caches are destroyed at the end of each query.
To enable caching, simply add @Cache
to the top of your query:
Use Flow’s local cache
Flow’s local cache runs in-process within Flow.
It’s the default cache that’s enabled if no connection is provided.
Use an external cache
Flow supports external caches, and will run a near-cache in-process, offloading to the remote cache as the library supports.
To enable a remote cache, first define a connection to the cache in your connections.conf
file, then specify
the name of the connection in your query.