You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/07/24 17:23:39 UTC

[camel] 02/02: CAMEL-14467: camel-jcache - Dynamically bypass the cache for lookups. Thanks to Jens Kleine-Herzbruch for the patch.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch bypass
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 7c495388e0a390aa179958bdd6b4516967ece8e2
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Jul 24 19:23:26 2023 +0200

    CAMEL-14467: camel-jcache - Dynamically bypass the cache for lookups. Thanks to Jens Kleine-Herzbruch for the patch.
---
 components/camel-jcache/src/main/docs/jcache-component.adoc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/components/camel-jcache/src/main/docs/jcache-component.adoc b/components/camel-jcache/src/main/docs/jcache-component.adoc
index 0a33957fca7..8f879fbbc63 100644
--- a/components/camel-jcache/src/main/docs/jcache-component.adoc
+++ b/components/camel-jcache/src/main/docs/jcache-component.adoc
@@ -177,6 +177,12 @@ from("direct:get-orders")
     .bean(OrderService.class,"findOrderById(${header.orderId})");
 ----------------------------
 
+== BypassExpression
+
+The `JCachePolicy` can be configured with an `Expression` that can per `Exchange` determine whether
+to look up the value from the cache or bypass. If the expression is evaluated to `false` then the route
+is executed as normal, and the returned value is inserted into the cache for future lookup.
+
 == Camel XML DSL examples
 
 == Use JCachePolicy in an XML route