{"action":"opened","issue":{"url":"https://api.github.com/repos/dkunzler/esperandro/issues/37","labels_url":"https://api.github.com/repos/dkunzler/esperandro/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/dkunzler/esperandro/issues/37/comments","events_url":"https://api.github.com/repos/dkunzler/esperandro/issues/37/events","html_url":"https://github.com/dkunzler/esperandro/issues/37","id":124405609,"number":37,"title":"Bug in cache feature","user":{"login":"MFlisar","id":2437726,"avatar_url":"https://avatars.githubusercontent.com/u/2437726?v=3","gravatar_id":"","url":"https://api.github.com/users/MFlisar","html_url":"https://github.com/MFlisar","followers_url":"https://api.github.com/users/MFlisar/followers","following_url":"https://api.github.com/users/MFlisar/following{/other_user}","gists_url":"https://api.github.com/users/MFlisar/gists{/gist_id}","starred_url":"https://api.github.com/users/MFlisar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MFlisar/subscriptions","organizations_url":"https://api.github.com/users/MFlisar/orgs","repos_url":"https://api.github.com/users/MFlisar/repos","events_url":"https://api.github.com/users/MFlisar/events{/privacy}","received_events_url":"https://api.github.com/users/MFlisar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-30T22:06:16Z","updated_at":"2015-12-30T22:06:16Z","closed_at":null,"body":"If I use setter with return type, the cache code is generated after returning the result of the setter...\r\n\r\nGenerated code looks like following:\r\n\r\n    @Override\r\n    public boolean versionShown(int versionShown) {\r\n        return preferences.edit().putInt(\"versionShown\", versionShown).commit();\r\n        cache.remove(\"versionShown\");\r\n    }\r\n\r\n\r\nand should look like following:\r\n\r\n    @Override\r\n    public boolean versionShown(int versionShown) {\r\n        cache.remove(\"versionShown\");\r\n        return preferences.edit().putInt(\"versionShown\", versionShown).commit();\r\n    }\r\n\r\nSame bug if I use the cache with `cacheOnPut = true`...\r\n"}}