{"action":"created","issue":{"url":"https://api.github.com/repos/android-cn/android-discuss/issues/138","labels_url":"https://api.github.com/repos/android-cn/android-discuss/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/android-cn/android-discuss/issues/138/comments","events_url":"https://api.github.com/repos/android-cn/android-discuss/issues/138/events","html_url":"https://github.com/android-cn/android-discuss/issues/138","id":69490092,"number":138,"title":"如何定时删除保存到本地的文件资源？说一下你的思路","user":{"login":"zhengluqiang","id":11006922,"avatar_url":"https://avatars.githubusercontent.com/u/11006922?v=3","gravatar_id":"","url":"https://api.github.com/users/zhengluqiang","html_url":"https://github.com/zhengluqiang","followers_url":"https://api.github.com/users/zhengluqiang/followers","following_url":"https://api.github.com/users/zhengluqiang/following{/other_user}","gists_url":"https://api.github.com/users/zhengluqiang/gists{/gist_id}","starred_url":"https://api.github.com/users/zhengluqiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhengluqiang/subscriptions","organizations_url":"https://api.github.com/users/zhengluqiang/orgs","repos_url":"https://api.github.com/users/zhengluqiang/repos","events_url":"https://api.github.com/users/zhengluqiang/events{/privacy}","received_events_url":"https://api.github.com/users/zhengluqiang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-20T02:09:22Z","updated_at":"2015-04-21T13:45:05Z","closed_at":null,"body":"比如，可以设置超过多少张图片后就删除之前的图片。。。或者，可以定时将本地所有照片都删除"},"comment":{"url":"https://api.github.com/repos/android-cn/android-discuss/issues/comments/94797225","html_url":"https://github.com/android-cn/android-discuss/issues/138#issuecomment-94797225","issue_url":"https://api.github.com/repos/android-cn/android-discuss/issues/138","id":94797225,"user":{"login":"zmywly8866","id":1912777,"avatar_url":"https://avatars.githubusercontent.com/u/1912777?v=3","gravatar_id":"","url":"https://api.github.com/users/zmywly8866","html_url":"https://github.com/zmywly8866","followers_url":"https://api.github.com/users/zmywly8866/followers","following_url":"https://api.github.com/users/zmywly8866/following{/other_user}","gists_url":"https://api.github.com/users/zmywly8866/gists{/gist_id}","starred_url":"https://api.github.com/users/zmywly8866/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmywly8866/subscriptions","organizations_url":"https://api.github.com/users/zmywly8866/orgs","repos_url":"https://api.github.com/users/zmywly8866/repos","events_url":"https://api.github.com/users/zmywly8866/events{/privacy}","received_events_url":"https://api.github.com/users/zmywly8866/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T13:45:05Z","updated_at":"2015-04-21T13:45:05Z","body":"@yanbober 我的意思是这个问题提了两种方案，并不是我建议采用这两种方案。\r\n如果是我来做，我会考虑在磁盘中建一个缓存文件夹，并设定这个文件夹的大小不能超过指定大小的空间，每次向文件夹缓存图片时，判断文件夹的大小，如果超过了指定的大小，根据缓存策略删掉最没有价值的图片来腾出空间（比如最近最少使用的图片）。"}}