{"action":"opened","issue":{"url":"https://api.github.com/repos/ben-manes/caffeine/issues/101","repository_url":"https://api.github.com/repos/ben-manes/caffeine","labels_url":"https://api.github.com/repos/ben-manes/caffeine/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/ben-manes/caffeine/issues/101/comments","events_url":"https://api.github.com/repos/ben-manes/caffeine/issues/101/events","html_url":"https://github.com/ben-manes/caffeine/issues/101","id":167050500,"number":101,"title":"Custom copy strategy","user":{"login":"GuillermoBlasco","id":1889971,"avatar_url":"https://avatars.githubusercontent.com/u/1889971?v=3","gravatar_id":"","url":"https://api.github.com/users/GuillermoBlasco","html_url":"https://github.com/GuillermoBlasco","followers_url":"https://api.github.com/users/GuillermoBlasco/followers","following_url":"https://api.github.com/users/GuillermoBlasco/following{/other_user}","gists_url":"https://api.github.com/users/GuillermoBlasco/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillermoBlasco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillermoBlasco/subscriptions","organizations_url":"https://api.github.com/users/GuillermoBlasco/orgs","repos_url":"https://api.github.com/users/GuillermoBlasco/repos","events_url":"https://api.github.com/users/GuillermoBlasco/events{/privacy}","received_events_url":"https://api.github.com/users/GuillermoBlasco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-22T13:55:05Z","updated_at":"2016-07-22T13:55:05Z","closed_at":null,"body":"Hello folks,\r\n\r\nI moved a project from Ehcache to Caffeine and testing I've found some concurrent access exception on some lists. Then I realised that these lists where cached. So what happened is that the list is cached by reference and when the value is retrived the same list is returned instead of a copy of such list.\r\n\r\nPut and get by reference is great if all your values are immutable, but at least for us that's not the case. For example we retrieve a cached list and then we sort it in place.\r\n\r\nI think it would be good to provide an access to configure the policy of how to process the returned value in case of hit. Similarly to http://www.ehcache.org/documentation/2.8/configuration/configuration.html#copyonread-and-copyonwrite-cache-configuration"}}
{"actor":{"display_login":"GuillermoBlasco"}}