Skip to content

Commit

Permalink
Add the new TimeUnit methods to the README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rocboronat committed Jun 7, 2016
1 parent 2df7d10 commit 39c23dd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://github.com/Fewlaps/quitnow-cache/releases/download/v1.6.0/quitnow-cache-1.6.0.jar">the latest .jar</a>
Expand Down

0 comments on commit 39c23dd

Please sign in to comment.