{"action":"created","issue":{"url":"https://api.github.com/repos/choderalab/openpathsampling/issues/276","labels_url":"https://api.github.com/repos/choderalab/openpathsampling/issues/276/labels{/name}","comments_url":"https://api.github.com/repos/choderalab/openpathsampling/issues/276/comments","events_url":"https://api.github.com/repos/choderalab/openpathsampling/issues/276/events","html_url":"https://github.com/choderalab/openpathsampling/pull/276","id":82802668,"number":276,"title":"[WIP] Least Recently Used (LRU) Cache","user":{"login":"jhprinz","id":5091934,"avatar_url":"https://avatars.githubusercontent.com/u/5091934?v=3","gravatar_id":"","url":"https://api.github.com/users/jhprinz","html_url":"https://github.com/jhprinz","followers_url":"https://api.github.com/users/jhprinz/followers","following_url":"https://api.github.com/users/jhprinz/following{/other_user}","gists_url":"https://api.github.com/users/jhprinz/gists{/gist_id}","starred_url":"https://api.github.com/users/jhprinz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhprinz/subscriptions","organizations_url":"https://api.github.com/users/jhprinz/orgs","repos_url":"https://api.github.com/users/jhprinz/repos","events_url":"https://api.github.com/users/jhprinz/events{/privacy}","received_events_url":"https://api.github.com/users/jhprinz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-05-30T12:35:19Z","updated_at":"2015-07-05T21:17:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/choderalab/openpathsampling/pulls/276","html_url":"https://github.com/choderalab/openpathsampling/pull/276","diff_url":"https://github.com/choderalab/openpathsampling/pull/276.diff","patch_url":"https://github.com/choderalab/openpathsampling/pull/276.patch"},"body":"Adding standard limited caching to storage and collective variables.\r\n\r\nWill resolve Issue #258 .\r\n\r\nI have implemented a simple LRU Caching.\r\n\r\n- [x] add LRU to object cache\r\n- [x] add LRU to collective variable caching\r\n- [x] add LRU to collective variable store caching\r\n- [x] add storage option to quickly change caching options on the fly\r\n- [x] add special storages for production / analysis that will set the caching appropriately\r\n\r\nCaching can already be changed during runtime. I have something like\r\n```\r\nstorage.set_cache_mode('production')  # almost no caching\r\n# run pathsampling\r\nstorage.set_cache_mode('analysis')  # maximum caching for cv, sample, pmc and sampleset\r\n# run analysis\r\n```\r\nand  with special storages I mean\r\n```\r\nstorage = AnalyticStorage(\"my_simulation.nc\")\r\n```\r\nwill open the store as usual, then set the caching to maximal for the usual stuff and run cache_all() to fill the cache"},"comment":{"url":"https://api.github.com/repos/choderalab/openpathsampling/issues/comments/118668192","html_url":"https://github.com/choderalab/openpathsampling/pull/276#issuecomment-118668192","issue_url":"https://api.github.com/repos/choderalab/openpathsampling/issues/276","id":118668192,"user":{"login":"jhprinz","id":5091934,"avatar_url":"https://avatars.githubusercontent.com/u/5091934?v=3","gravatar_id":"","url":"https://api.github.com/users/jhprinz","html_url":"https://github.com/jhprinz","followers_url":"https://api.github.com/users/jhprinz/followers","following_url":"https://api.github.com/users/jhprinz/following{/other_user}","gists_url":"https://api.github.com/users/jhprinz/gists{/gist_id}","starred_url":"https://api.github.com/users/jhprinz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhprinz/subscriptions","organizations_url":"https://api.github.com/users/jhprinz/orgs","repos_url":"https://api.github.com/users/jhprinz/repos","events_url":"https://api.github.com/users/jhprinz/events{/privacy}","received_events_url":"https://api.github.com/users/jhprinz/received_events","type":"User","site_admin":false},"created_at":"2015-07-05T21:17:56Z","updated_at":"2015-07-05T21:17:56Z","body":"Good point. I am not too sure on how to proof this works now. In principle this is ready for review and merge, once I found a test to check for it to work :)"}}