From 8c58144ac003daec3906388ce88e01cce73b0e6c Mon Sep 17 00:00:00 2001 From: andreoss Date: Wed, 2 Sep 2020 17:02:56 -0400 Subject: [PATCH] (#179) Add puzzle --- .../java/com/jcabi/http/wire/CachingWire.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/jcabi/http/wire/CachingWire.java b/src/main/java/com/jcabi/http/wire/CachingWire.java index f8a9f00c..1797610a 100644 --- a/src/main/java/com/jcabi/http/wire/CachingWire.java +++ b/src/main/java/com/jcabi/http/wire/CachingWire.java @@ -67,12 +67,25 @@ * .uri().path("/save/123").back() * .fetch(); * + *

Since 1.17.3, you can pass a {@see LoadingCache} alongside the wire. + * + *

{@code
+ * final LoadingCache, Response> cache = ...;
+ * new JdkRequest(uri)
+ *   .through(CachingWire.class, cache)
+ *   .uri().path("/save/123").back()
+ *   .fetch();
+ *  }
+ * *

The regular expression provided will be used against a string * constructed as an HTTP method, space, path of the URI together with * query part. * *

The class is immutable and thread-safe. - * + * @todo #179:30m This implementation depends on Guava. Investigate for a + * possible shared interface between this class and other implementations for + * caching. If this shared interface is possible replace this task with a task + * for implementing it. * @since 1.0 */ @Immutable