From 39c23ddee8337b4fe5e10dfbb144471c067416fb Mon Sep 17 00:00:00 2001 From: Roc Boronat Date: Wed, 8 Jun 2016 00:56:54 +0200 Subject: [PATCH] Add the new TimeUnit methods to the README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index d23302c..722318b 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,16 @@ QNCache cache = new QNCacheBuilder().setDefaultKeepaliveInMillis(1000 * 60).crea QNCache cache = new QNCacheBuilder().createQNCache(); //the default keepalive: remember it forever! ``` +Why working with millis and seconds? +--------------------------- +Good question! If you prefer to work with TimeUnit, you're free to do it. + +```java +QNCache cache = new QNCacheBuilder().setAutoRelease(2, TimeUnit.HOURS).createQNCache(); +QNCache cache = new QNCacheBuilder().setDefaultKeepalive(5, TimeUnit.MINUTES).createQNCache(); +cache.set("key", "value", 42, TimeUnit.SECONDS); +``` + #Download * Get the latest .jar