{"action":"created","comment":{"url":"https://api.github.com/repos/bumptech/glide/pulls/comments/28779429","id":28779429,"diff_hunk":"@@ -2,47 +2,28 @@\n \n import android.content.Context;\n \n-import com.bumptech.glide.Glide;\n-\n import java.io.File;\n \n /**\n  * Creates an {@link com.bumptech.glide.disklrucache.DiskLruCache} based disk cache in the internal disk cache\n  * directory.\n  */\n-public final class InternalCacheDiskCacheFactory implements DiskCache.Factory {\n-    private final Context context;\n-    private final String diskCacheName;\n-    private final int diskCacheSize;\n+public final class InternalCacheDiskCacheFactory extends DefaultDiskCacheFactory {\n \n     public InternalCacheDiskCacheFactory(Context context, int diskCacheSize) {\n         this(context, null /*diskCacheName*/, diskCacheSize);\n     }\n \n     public InternalCacheDiskCacheFactory(Context context, String diskCacheName, int diskCacheSize) {\n-        this.context = context;\n-        this.diskCacheName = diskCacheName;\n-        this.diskCacheSize = diskCacheSize;\n+        super(getInternalCacheFolder(context), diskCacheName, diskCacheSize);\n     }\n \n-    @Override\n-    public DiskCache build() {\n-        DiskCache diskCache = null;\n-        final File cacheDir;\n-\n-        if (diskCacheName != null) {\n-            cacheDir = Glide.getPhotoCacheDir(context, diskCacheName);\n-        } else {\n-            cacheDir = Glide.getPhotoCacheDir(context);\n-        }\n-\n+    private static String getInternalCacheFolder(Context context) {\n+        File cacheDir = context.getCacheDir();","path":"library/src/main/java/com/bumptech/glide/load/engine/cache/InternalCacheDiskCacheFactory.java","position":41,"original_position":41,"commit_id":"cfdc2f68061903dba480ea897b6311bff7e40729","original_commit_id":"cfdc2f68061903dba480ea897b6311bff7e40729","user":{"login":"sjudd","id":1627211,"avatar_url":"https://avatars.githubusercontent.com/u/1627211?v=3","gravatar_id":"","url":"https://api.github.com/users/sjudd","html_url":"https://github.com/sjudd","followers_url":"https://api.github.com/users/sjudd/followers","following_url":"https://api.github.com/users/sjudd/following{/other_user}","gists_url":"https://api.github.com/users/sjudd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjudd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjudd/subscriptions","organizations_url":"https://api.github.com/users/sjudd/orgs","repos_url":"https://api.github.com/users/sjudd/repos","events_url":"https://api.github.com/users/sjudd/events{/privacy}","received_events_url":"https://api.github.com/users/sjudd/received_events","type":"User","site_admin":false},"body":"Same issue here. ","created_at":"2015-04-21T13:55:25Z","updated_at":"2015-04-21T13:55:25Z","html_url":"https://github.com/bumptech/glide/pull/430#discussion_r28779429","pull_request_url":"https://api.github.com/repos/bumptech/glide/pulls/430","_links":{"self":{"href":"https://api.github.com/repos/bumptech/glide/pulls/comments/28779429"},"html":{"href":"https://github.com/bumptech/glide/pull/430#discussion_r28779429"},"pull_request":{"href":"https://api.github.com/repos/bumptech/glide/pulls/430"}}},"pull_request":{"url":"https://api.github.com/repos/bumptech/glide/pulls/430","id":33745351,"html_url":"https://github.com/bumptech/glide/pull/430","diff_url":"https://github.com/bumptech/glide/pull/430.diff","patch_url":"https://github.com/bumptech/glide/pull/430.patch","issue_url":"https://api.github.com/repos/bumptech/glide/issues/430","number":430,"state":"open","locked":false,"title":"Extends glide disk cache factories","user":{"login":"Tolriq","id":932609,"avatar_url":"https://avatars.githubusercontent.com/u/932609?v=3","gravatar_id":"","url":"https://api.github.com/users/Tolriq","html_url":"https://github.com/Tolriq","followers_url":"https://api.github.com/users/Tolriq/followers","following_url":"https://api.github.com/users/Tolriq/following{/other_user}","gists_url":"https://api.github.com/users/Tolriq/gists{/gist_id}","starred_url":"https://api.github.com/users/Tolriq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tolriq/subscriptions","organizations_url":"https://api.github.com/users/Tolriq/orgs","repos_url":"https://api.github.com/users/Tolriq/repos","events_url":"https://api.github.com/users/Tolriq/events{/privacy}","received_events_url":"https://api.github.com/users/Tolriq/received_events","type":"User","site_admin":false},"body":"Add new DefaultDiskCacheFactory and ExternalCacheDiskCacheFactory\r\nRefactor InternalCacheDiskCacheFactory to use new DefaultDiskCacheFactory","created_at":"2015-04-21T09:54:51Z","updated_at":"2015-04-21T13:55:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9909e397c6fbfe97d078a405fec35277f476f8b2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bumptech/glide/pulls/430/commits","review_comments_url":"https://api.github.com/repos/bumptech/glide/pulls/430/comments","review_comment_url":"https://api.github.com/repos/bumptech/glide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bumptech/glide/issues/430/comments","statuses_url":"https://api.github.com/repos/bumptech/glide/statuses/cfdc2f68061903dba480ea897b6311bff7e40729","head":{"label":"Tolriq:cacheFactory","ref":"cacheFactory","sha":"cfdc2f68061903dba480ea897b6311bff7e40729","user":{"login":"Tolriq","id":932609,"avatar_url":"https://avatars.githubusercontent.com/u/932609?v=3","gravatar_id":"","url":"https://api.github.com/users/Tolriq","html_url":"https://github.com/Tolriq","followers_url":"https://api.github.com/users/Tolriq/followers","following_url":"https://api.github.com/users/Tolriq/following{/other_user}","gists_url":"https://api.github.com/users/Tolriq/gists{/gist_id}","starred_url":"https://api.github.com/users/Tolriq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tolriq/subscriptions","organizations_url":"https://api.github.com/users/Tolriq/orgs","repos_url":"https://api.github.com/users/Tolriq/repos","events_url":"https://api.github.com/users/Tolriq/events{/privacy}","received_events_url":"https://api.github.com/users/Tolriq/received_events","type":"User","site_admin":false},"repo":{"id":33870798,"name":"glide","full_name":"Tolriq/glide","owner":{"login":"Tolriq","id":932609,"avatar_url":"https://avatars.githubusercontent.com/u/932609?v=3","gravatar_id":"","url":"https://api.github.com/users/Tolriq","html_url":"https://github.com/Tolriq","followers_url":"https://api.github.com/users/Tolriq/followers","following_url":"https://api.github.com/users/Tolriq/following{/other_user}","gists_url":"https://api.github.com/users/Tolriq/gists{/gist_id}","starred_url":"https://api.github.com/users/Tolriq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tolriq/subscriptions","organizations_url":"https://api.github.com/users/Tolriq/orgs","repos_url":"https://api.github.com/users/Tolriq/repos","events_url":"https://api.github.com/users/Tolriq/events{/privacy}","received_events_url":"https://api.github.com/users/Tolriq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Tolriq/glide","description":"An image loading and caching library for Android focused on smooth scrolling","fork":true,"url":"https://api.github.com/repos/Tolriq/glide","forks_url":"https://api.github.com/repos/Tolriq/glide/forks","keys_url":"https://api.github.com/repos/Tolriq/glide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tolriq/glide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tolriq/glide/teams","hooks_url":"https://api.github.com/repos/Tolriq/glide/hooks","issue_events_url":"https://api.github.com/repos/Tolriq/glide/issues/events{/number}","events_url":"https://api.github.com/repos/Tolriq/glide/events","assignees_url":"https://api.github.com/repos/Tolriq/glide/assignees{/user}","branches_url":"https://api.github.com/repos/Tolriq/glide/branches{/branch}","tags_url":"https://api.github.com/repos/Tolriq/glide/tags","blobs_url":"https://api.github.com/repos/Tolriq/glide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tolriq/glide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tolriq/glide/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tolriq/glide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tolriq/glide/statuses/{sha}","languages_url":"https://api.github.com/repos/Tolriq/glide/languages","stargazers_url":"https://api.github.com/repos/Tolriq/glide/stargazers","contributors_url":"https://api.github.com/repos/Tolriq/glide/contributors","subscribers_url":"https://api.github.com/repos/Tolriq/glide/subscribers","subscription_url":"https://api.github.com/repos/Tolriq/glide/subscription","commits_url":"https://api.github.com/repos/Tolriq/glide/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tolriq/glide/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tolriq/glide/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tolriq/glide/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tolriq/glide/contents/{+path}","compare_url":"https://api.github.com/repos/Tolriq/glide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tolriq/glide/merges","archive_url":"https://api.github.com/repos/Tolriq/glide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tolriq/glide/downloads","issues_url":"https://api.github.com/repos/Tolriq/glide/issues{/number}","pulls_url":"https://api.github.com/repos/Tolriq/glide/pulls{/number}","milestones_url":"https://api.github.com/repos/Tolriq/glide/milestones{/number}","notifications_url":"https://api.github.com/repos/Tolriq/glide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tolriq/glide/labels{/name}","releases_url":"https://api.github.com/repos/Tolriq/glide/releases{/id}","created_at":"2015-04-13T13:41:51Z","updated_at":"2015-04-21T09:49:20Z","pushed_at":"2015-04-21T09:57:36Z","git_url":"git://github.com/Tolriq/glide.git","ssh_url":"git@github.com:Tolriq/glide.git","clone_url":"https://github.com/Tolriq/glide.git","svn_url":"https://github.com/Tolriq/glide","homepage":null,"size":22769,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bumptech:master","ref":"master","sha":"8dbafcd3a80db565761e44942b88170911ab63f5","user":{"login":"bumptech","id":423539,"avatar_url":"https://avatars.githubusercontent.com/u/423539?v=3","gravatar_id":"","url":"https://api.github.com/users/bumptech","html_url":"https://github.com/bumptech","followers_url":"https://api.github.com/users/bumptech/followers","following_url":"https://api.github.com/users/bumptech/following{/other_user}","gists_url":"https://api.github.com/users/bumptech/gists{/gist_id}","starred_url":"https://api.github.com/users/bumptech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bumptech/subscriptions","organizations_url":"https://api.github.com/users/bumptech/orgs","repos_url":"https://api.github.com/users/bumptech/repos","events_url":"https://api.github.com/users/bumptech/events{/privacy}","received_events_url":"https://api.github.com/users/bumptech/received_events","type":"Organization","site_admin":false},"repo":{"id":11267509,"name":"glide","full_name":"bumptech/glide","owner":{"login":"bumptech","id":423539,"avatar_url":"https://avatars.githubusercontent.com/u/423539?v=3","gravatar_id":"","url":"https://api.github.com/users/bumptech","html_url":"https://github.com/bumptech","followers_url":"https://api.github.com/users/bumptech/followers","following_url":"https://api.github.com/users/bumptech/following{/other_user}","gists_url":"https://api.github.com/users/bumptech/gists{/gist_id}","starred_url":"https://api.github.com/users/bumptech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bumptech/subscriptions","organizations_url":"https://api.github.com/users/bumptech/orgs","repos_url":"https://api.github.com/users/bumptech/repos","events_url":"https://api.github.com/users/bumptech/events{/privacy}","received_events_url":"https://api.github.com/users/bumptech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bumptech/glide","description":"An image loading and caching library for Android focused on smooth scrolling","fork":false,"url":"https://api.github.com/repos/bumptech/glide","forks_url":"https://api.github.com/repos/bumptech/glide/forks","keys_url":"https://api.github.com/repos/bumptech/glide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bumptech/glide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bumptech/glide/teams","hooks_url":"https://api.github.com/repos/bumptech/glide/hooks","issue_events_url":"https://api.github.com/repos/bumptech/glide/issues/events{/number}","events_url":"https://api.github.com/repos/bumptech/glide/events","assignees_url":"https://api.github.com/repos/bumptech/glide/assignees{/user}","branches_url":"https://api.github.com/repos/bumptech/glide/branches{/branch}","tags_url":"https://api.github.com/repos/bumptech/glide/tags","blobs_url":"https://api.github.com/repos/bumptech/glide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bumptech/glide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bumptech/glide/git/refs{/sha}","trees_url":"https://api.github.com/repos/bumptech/glide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bumptech/glide/statuses/{sha}","languages_url":"https://api.github.com/repos/bumptech/glide/languages","stargazers_url":"https://api.github.com/repos/bumptech/glide/stargazers","contributors_url":"https://api.github.com/repos/bumptech/glide/contributors","subscribers_url":"https://api.github.com/repos/bumptech/glide/subscribers","subscription_url":"https://api.github.com/repos/bumptech/glide/subscription","commits_url":"https://api.github.com/repos/bumptech/glide/commits{/sha}","git_commits_url":"https://api.github.com/repos/bumptech/glide/git/commits{/sha}","comments_url":"https://api.github.com/repos/bumptech/glide/comments{/number}","issue_comment_url":"https://api.github.com/repos/bumptech/glide/issues/comments{/number}","contents_url":"https://api.github.com/repos/bumptech/glide/contents/{+path}","compare_url":"https://api.github.com/repos/bumptech/glide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bumptech/glide/merges","archive_url":"https://api.github.com/repos/bumptech/glide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bumptech/glide/downloads","issues_url":"https://api.github.com/repos/bumptech/glide/issues{/number}","pulls_url":"https://api.github.com/repos/bumptech/glide/pulls{/number}","milestones_url":"https://api.github.com/repos/bumptech/glide/milestones{/number}","notifications_url":"https://api.github.com/repos/bumptech/glide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bumptech/glide/labels{/name}","releases_url":"https://api.github.com/repos/bumptech/glide/releases{/id}","created_at":"2013-07-08T22:52:33Z","updated_at":"2015-04-21T12:18:21Z","pushed_at":"2015-04-21T09:54:51Z","git_url":"git://github.com/bumptech/glide.git","ssh_url":"git@github.com:bumptech/glide.git","clone_url":"https://github.com/bumptech/glide.git","svn_url":"https://github.com/bumptech/glide","homepage":null,"size":26295,"stargazers_count":2599,"watchers_count":2599,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":456,"mirror_url":null,"open_issues_count":78,"forks":456,"open_issues":78,"watchers":2599,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bumptech/glide/pulls/430"},"html":{"href":"https://github.com/bumptech/glide/pull/430"},"issue":{"href":"https://api.github.com/repos/bumptech/glide/issues/430"},"comments":{"href":"https://api.github.com/repos/bumptech/glide/issues/430/comments"},"review_comments":{"href":"https://api.github.com/repos/bumptech/glide/pulls/430/comments"},"review_comment":{"href":"https://api.github.com/repos/bumptech/glide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bumptech/glide/pulls/430/commits"},"statuses":{"href":"https://api.github.com/repos/bumptech/glide/statuses/cfdc2f68061903dba480ea897b6311bff7e40729"}}}}