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

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

commit d8887d92259aec438bf7771ceed57a5d35dc3f22
Author: Andrea Cosentino <[email protected]>
AuthorDate: Tue May 29 11:50:04 2018 +0200

    CAMEL-12539 - camel-caffeine: improve documentation
---
 .../src/main/docs/caffeine-cache-component.adoc    | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git 
a/components/camel-caffeine/src/main/docs/caffeine-cache-component.adoc 
b/components/camel-caffeine/src/main/docs/caffeine-cache-component.adoc
index 67fb7d6..6676545 100644
--- a/components/camel-caffeine/src/main/docs/caffeine-cache-component.adoc
+++ b/components/camel-caffeine/src/main/docs/caffeine-cache-component.adoc
@@ -93,3 +93,35 @@ with the following path and query parameters:
 | *valueType* (advanced) | The cache value type, default java.lang.Object | 
java.lang.Object | String
 |===
 // endpoint options: END
+
+### Examples
+
+You can use your cache with the following code:
+
+[source,java]
+------------------------------------------------------------
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() {
+                from("direct://start")
+                    .toF("caffeine-cache://%s?cache=#cache&action=PUT&key=1", 
"test")
+                    .toF("caffeine-cache://%s?cache=#cache&key=1&action=GET", 
"test")
+                    .log("Test! ${body}")
+                    .to("mock:result");
+            }
+        };
+    }
+------------------------------------------------------------
+
+In this way you'll work always on the same cache in the registry.
+
+### Check operation result
+
+Each time you'll use an operation on the cache you'll have two different 
headers to check for status:
+
+[source,java]
+------------------------------------------------------------
+CaffeineConstants.ACTION_HAS_RESULT
+CaffeineConstants.ACTION_SUCCEEDED
+------------------------------------------------------------

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to