{"action":"created","issue":{"url":"https://api.github.com/repos/sympy/sympy/issues/2448","labels_url":"https://api.github.com/repos/sympy/sympy/issues/2448/labels{/name}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/2448/comments","events_url":"https://api.github.com/repos/sympy/sympy/issues/2448/events","html_url":"https://github.com/sympy/sympy/pull/2448","id":19287866,"number":2448,"title":"WIP: Localized Caching","user":{"login":"gilbertgede","id":331109,"avatar_url":"https://avatars.githubusercontent.com/u/331109?v=3","gravatar_id":"","url":"https://api.github.com/users/gilbertgede","html_url":"https://github.com/gilbertgede","followers_url":"https://api.github.com/users/gilbertgede/followers","following_url":"https://api.github.com/users/gilbertgede/following{/other_user}","gists_url":"https://api.github.com/users/gilbertgede/gists{/gist_id}","starred_url":"https://api.github.com/users/gilbertgede/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gilbertgede/subscriptions","organizations_url":"https://api.github.com/users/gilbertgede/orgs","repos_url":"https://api.github.com/users/gilbertgede/repos","events_url":"https://api.github.com/users/gilbertgede/events{/privacy}","received_events_url":"https://api.github.com/users/gilbertgede/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sympy/sympy/labels/physics.mechanics","name":"physics.mechanics","color":"0000FF"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/sympy/sympy/milestones/6","html_url":"https://github.com/sympy/sympy/milestones/Not%20for%200.7.4","labels_url":"https://api.github.com/repos/sympy/sympy/milestones/6/labels","id":480543,"number":6,"title":"Not for 0.7.4","description":"Can be postponed until after the 0.7.4 release.","creator":{"login":"asmeurer","id":71486,"avatar_url":"https://avatars.githubusercontent.com/u/71486?v=3","gravatar_id":"","url":"https://api.github.com/users/asmeurer","html_url":"https://github.com/asmeurer","followers_url":"https://api.github.com/users/asmeurer/followers","following_url":"https://api.github.com/users/asmeurer/following{/other_user}","gists_url":"https://api.github.com/users/asmeurer/gists{/gist_id}","starred_url":"https://api.github.com/users/asmeurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmeurer/subscriptions","organizations_url":"https://api.github.com/users/asmeurer/orgs","repos_url":"https://api.github.com/users/asmeurer/repos","events_url":"https://api.github.com/users/asmeurer/events{/privacy}","received_events_url":"https://api.github.com/users/asmeurer/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":4,"state":"open","created_at":"2013-11-10T22:05:36Z","updated_at":"2015-05-28T00:28:25Z","due_on":null,"closed_at":null},"comments":29,"created_at":"2013-09-10T22:03:29Z","updated_at":"2015-05-28T20:34:44Z","closed_at":"2015-05-28T00:28:25Z","pull_request":{"url":"https://api.github.com/repos/sympy/sympy/pulls/2448","html_url":"https://github.com/sympy/sympy/pull/2448","diff_url":"https://github.com/sympy/sympy/pull/2448.diff","patch_url":"https://github.com/sympy/sympy/pull/2448.patch"},"body":"A different approach to caching in SymPy.\r\n\r\nInstead of the previous approach, where various methods were decorated with `@cacheit` to show that their output should be cached, there are now 2 decorators: `@user_cacheit` and `@cacheit`. The new method has \"user-level\" functions/methods decorated with the `@user_cacheit`. This turns on a flag, and upon exiting the first called user-level method with this decorator, it clears the cache (and turns off that flag). The `@cacheit` decorator now only looks to the cache in the case where the flag is on - otherwise it operates normally.\r\n\r\nIt's kind of rough, but I believe all tests were passing, with only a moderate slowdown. There is probably lots of work to do - better naming, adding/removing methods to be \"user-cached\" and \"hidden-cached\", etc."},"comment":{"url":"https://api.github.com/repos/sympy/sympy/issues/comments/106588203","html_url":"https://github.com/sympy/sympy/pull/2448#issuecomment-106588203","issue_url":"https://api.github.com/repos/sympy/sympy/issues/2448","id":106588203,"user":{"login":"gilbertgede","id":331109,"avatar_url":"https://avatars.githubusercontent.com/u/331109?v=3","gravatar_id":"","url":"https://api.github.com/users/gilbertgede","html_url":"https://github.com/gilbertgede","followers_url":"https://api.github.com/users/gilbertgede/followers","following_url":"https://api.github.com/users/gilbertgede/following{/other_user}","gists_url":"https://api.github.com/users/gilbertgede/gists{/gist_id}","starred_url":"https://api.github.com/users/gilbertgede/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gilbertgede/subscriptions","organizations_url":"https://api.github.com/users/gilbertgede/orgs","repos_url":"https://api.github.com/users/gilbertgede/repos","events_url":"https://api.github.com/users/gilbertgede/events{/privacy}","received_events_url":"https://api.github.com/users/gilbertgede/received_events","type":"User","site_admin":false},"created_at":"2015-05-28T20:34:44Z","updated_at":"2015-05-28T20:34:44Z","body":"Yeah, this was from way before that, so it definitely shouldn't be a thing anymore."}}