{"action":"created","issue":{"url":"https://api.github.com/repos/ben-manes/caffeine/issues/64","repository_url":"https://api.github.com/repos/ben-manes/caffeine","labels_url":"https://api.github.com/repos/ben-manes/caffeine/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/ben-manes/caffeine/issues/64/comments","events_url":"https://api.github.com/repos/ben-manes/caffeine/issues/64/events","html_url":"https://github.com/ben-manes/caffeine/issues/64","id":147128752,"number":64,"title":"Trigger eviction / when does eviction happen?","user":{"login":"cruftex","id":2668191,"avatar_url":"https://avatars.githubusercontent.com/u/2668191?v=3","gravatar_id":"","url":"https://api.github.com/users/cruftex","html_url":"https://github.com/cruftex","followers_url":"https://api.github.com/users/cruftex/followers","following_url":"https://api.github.com/users/cruftex/following{/other_user}","gists_url":"https://api.github.com/users/cruftex/gists{/gist_id}","starred_url":"https://api.github.com/users/cruftex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cruftex/subscriptions","organizations_url":"https://api.github.com/users/cruftex/orgs","repos_url":"https://api.github.com/users/cruftex/repos","events_url":"https://api.github.com/users/cruftex/events{/privacy}","received_events_url":"https://api.github.com/users/cruftex/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-04-09T13:26:19Z","updated_at":"2016-04-17T19:19:38Z","closed_at":"2016-04-09T19:19:08Z","body":"As part of a benchmark I'd like to test the efficiency of the eviction algorithm. However, it seems Caffeine isn't strictly adhering to the `maximumSize` setting. E.g. one test runs with a random pattern of 1000 keys and a maximum cache size of 500 and yields a phenomenal hitrate of 97%. The benchmark is `CaffeineBenchmark.benchmarkTotalRandom1000_500` at https://github.com/cache2k/cache2k-benchmark\r\n\r\nI tried with `cleanUp` but it seems not to trigger the eviction. Is there a way to force eviction? Any other ideas to do a reasonable efficiency comparison?"},"comment":{"url":"https://api.github.com/repos/ben-manes/caffeine/issues/comments/211090553","html_url":"https://github.com/ben-manes/caffeine/issues/64#issuecomment-211090553","issue_url":"https://api.github.com/repos/ben-manes/caffeine/issues/64","id":211090553,"user":{"login":"ben-manes","id":378614,"avatar_url":"https://avatars.githubusercontent.com/u/378614?v=3","gravatar_id":"","url":"https://api.github.com/users/ben-manes","html_url":"https://github.com/ben-manes","followers_url":"https://api.github.com/users/ben-manes/followers","following_url":"https://api.github.com/users/ben-manes/following{/other_user}","gists_url":"https://api.github.com/users/ben-manes/gists{/gist_id}","starred_url":"https://api.github.com/users/ben-manes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ben-manes/subscriptions","organizations_url":"https://api.github.com/users/ben-manes/orgs","repos_url":"https://api.github.com/users/ben-manes/repos","events_url":"https://api.github.com/users/ben-manes/events{/privacy}","received_events_url":"https://api.github.com/users/ben-manes/received_events","type":"User","site_admin":false},"created_at":"2016-04-17T19:19:38Z","updated_at":"2016-04-17T19:19:38Z","body":"Released 2.2.7 which includes the `initialCapacity` change, which will help your small trace simulations."}}