Conditionally fetch or store cache datav3.12+

This example leverages the cache and branch nodes to conditionally store or retrieve cache items.

The cache node requires a cache resource. In this example, we use an in-memory cache resource. For all options, see the cache resource reference.

Note: When using the branch node, the then and else parameters must list all nodes for both branches. If a node isn’t listed in the branch, the node will run depending on its location in the flow configuration.

Set up the plugin

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!