{"action":"opened","issue":{"url":"https://api.github.com/repos/ben-manes/caffeine/issues/221","repository_url":"https://api.github.com/repos/ben-manes/caffeine","labels_url":"https://api.github.com/repos/ben-manes/caffeine/issues/221/labels{/name}","comments_url":"https://api.github.com/repos/ben-manes/caffeine/issues/221/comments","events_url":"https://api.github.com/repos/ben-manes/caffeine/issues/221/events","html_url":"https://github.com/ben-manes/caffeine/issues/221","id":295730920,"number":221,"title":"Consider adding `java.time.Duration` overloads to cache builder","user":{"login":"kluever","id":2036304,"avatar_url":"https://avatars1.githubusercontent.com/u/2036304?v=4","gravatar_id":"","url":"https://api.github.com/users/kluever","html_url":"https://github.com/kluever","followers_url":"https://api.github.com/users/kluever/followers","following_url":"https://api.github.com/users/kluever/following{/other_user}","gists_url":"https://api.github.com/users/kluever/gists{/gist_id}","starred_url":"https://api.github.com/users/kluever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kluever/subscriptions","organizations_url":"https://api.github.com/users/kluever/orgs","repos_url":"https://api.github.com/users/kluever/repos","events_url":"https://api.github.com/users/kluever/events{/privacy}","received_events_url":"https://api.github.com/users/kluever/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-09T02:04:48Z","updated_at":"2018-02-09T02:04:48Z","closed_at":null,"author_association":"NONE","body":"I know you (Ben) thumbs down'ed the [proposal](https://github.com/google/guava/issues/2999) for Guava's cache, but I'd be in favor of adding them to Caffeine.\r\n\r\nIn my opinion, `java.time.Duration` should be preferred over a pair of `long, TimeUnit` for all APIs going forward, with the exception of concurrency-only APIs (e.g., `Futures` and friends). To me, caching is different enough from those APIs that we should consider adding the overloads.\r\n\r\nThe `long,TimeUnit` pattern is error-prone and requires users pass around 2 values, one of which is a bare `long`."}}
{"actor":{"display_login":"kluever"}}