{"action":"created","issue":{"url":"https://api.github.com/repos/nilearn/nilearn/issues/362","labels_url":"https://api.github.com/repos/nilearn/nilearn/issues/362/labels{/name}","comments_url":"https://api.github.com/repos/nilearn/nilearn/issues/362/comments","events_url":"https://api.github.com/repos/nilearn/nilearn/issues/362/events","html_url":"https://github.com/nilearn/nilearn/issues/362","id":55116974,"number":362,"title":"Feature request: default cache location","user":{"login":"bcipolli","id":4072455,"avatar_url":"https://avatars.githubusercontent.com/u/4072455?v=3","gravatar_id":"","url":"https://api.github.com/users/bcipolli","html_url":"https://github.com/bcipolli","followers_url":"https://api.github.com/users/bcipolli/followers","following_url":"https://api.github.com/users/bcipolli/following{/other_user}","gists_url":"https://api.github.com/users/bcipolli/gists{/gist_id}","starred_url":"https://api.github.com/users/bcipolli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcipolli/subscriptions","organizations_url":"https://api.github.com/users/bcipolli/orgs","repos_url":"https://api.github.com/users/bcipolli/repos","events_url":"https://api.github.com/users/bcipolli/events{/privacy}","received_events_url":"https://api.github.com/users/bcipolli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-01-22T05:49:48Z","updated_at":"2015-01-24T13:51:05Z","closed_at":null,"body":"Right now, each time a Memory object is created, a path must be given to a cache location.  The safest path to specify is one relative to the script location.  This is inconvenient:\r\n* Cache files are distributed in multiple locations and therefore hard to clear.\r\n* Searching the source tree becomes slow (as some search programs search all files for text)\r\n* If the cache location isn't already in the `.gitignore`, then git workflow can become messy (for example, using `git gui`).\r\n\r\nI would like cache location to work like nilearn download/data location--to have a set of fallbacks for the Memory cache location:\r\n* First, check for any explicit argument.\r\n* If none, then use an environment variable value (e.g. `NILEARN_CACHE`).\r\n* If none, then don't cache.\r\n\r\nThis is impairing my workflow enough that I'd like to investigate this solution a bit more.  I welcome alternate solutions / ideas / thoughts / objections :)"},"comment":{"url":"https://api.github.com/repos/nilearn/nilearn/issues/comments/71317476","html_url":"https://github.com/nilearn/nilearn/issues/362#issuecomment-71317476","issue_url":"https://api.github.com/repos/nilearn/nilearn/issues/362","id":71317476,"user":{"login":"bcipolli","id":4072455,"avatar_url":"https://avatars.githubusercontent.com/u/4072455?v=3","gravatar_id":"","url":"https://api.github.com/users/bcipolli","html_url":"https://github.com/bcipolli","followers_url":"https://api.github.com/users/bcipolli/followers","following_url":"https://api.github.com/users/bcipolli/following{/other_user}","gists_url":"https://api.github.com/users/bcipolli/gists{/gist_id}","starred_url":"https://api.github.com/users/bcipolli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcipolli/subscriptions","organizations_url":"https://api.github.com/users/bcipolli/orgs","repos_url":"https://api.github.com/users/bcipolli/repos","events_url":"https://api.github.com/users/bcipolli/events{/privacy}","received_events_url":"https://api.github.com/users/bcipolli/received_events","type":"User","site_admin":false},"created_at":"2015-01-24T13:51:05Z","updated_at":"2015-01-24T13:51:05Z","body":"Let me know if this is something to move forward with.  Otherwise, I suggest we close it as wontfix.\r\n\r\nFor me, this is a nice alternative to explicitly hard-coding behavior across the app (`Memory(cachedir=none)`), where we can control that behavior with a single change in the future.  The file name change from `cache_mixin.py` to `cache.py` also seems like an improvement.  And the code is done.\r\n\r\nEither way is fine by me, just wanting to get some clarity.  Thanks!"}}