{"action":"created","comment":{"url":"https://api.github.com/repos/nette/caching/pulls/comments/49646725","id":49646725,"diff_hunk":"@@ -365,8 +365,11 @@ protected function readData($meta)\n \tprotected function getCacheFile($key)\n \t{\n \t\t$file = urlencode($key);\n-\t\tif ($this->useDirs && $a = strrpos($file, '%00')) { // %00 = urlencode(Nette\\Caching\\Cache::NAMESPACE_SEPARATOR)\n-\t\t\t$file = substr_replace($file, '/_', $a, 3);\n+\t\tif ($this->useDirs) {","path":"src/Caching/Storages/FileStorage.php","position":15,"original_position":15,"commit_id":"3c74ebf23a19c8a5debadbe767e056d351d51197","original_commit_id":"3c74ebf23a19c8a5debadbe767e056d351d51197","user":{"login":"dg","id":194960,"avatar_url":"https://avatars.githubusercontent.com/u/194960?v=3","gravatar_id":"","url":"https://api.github.com/users/dg","html_url":"https://github.com/dg","followers_url":"https://api.github.com/users/dg/followers","following_url":"https://api.github.com/users/dg/following{/other_user}","gists_url":"https://api.github.com/users/dg/gists{/gist_id}","starred_url":"https://api.github.com/users/dg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dg/subscriptions","organizations_url":"https://api.github.com/users/dg/orgs","repos_url":"https://api.github.com/users/dg/repos","events_url":"https://api.github.com/users/dg/events{/privacy}","received_events_url":"https://api.github.com/users/dg/received_events","type":"User","site_admin":false},"body":"What about `$file = str_replace('%00', '/_', $file);`","created_at":"2016-01-13T20:36:45Z","updated_at":"2016-01-13T20:36:45Z","html_url":"https://github.com/nette/caching/pull/33#discussion_r49646725","pull_request_url":"https://api.github.com/repos/nette/caching/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/nette/caching/pulls/comments/49646725"},"html":{"href":"https://github.com/nette/caching/pull/33#discussion_r49646725"},"pull_request":{"href":"https://api.github.com/repos/nette/caching/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/nette/caching/pulls/33","id":48354904,"html_url":"https://github.com/nette/caching/pull/33","diff_url":"https://github.com/nette/caching/pull/33.diff","patch_url":"https://github.com/nette/caching/pull/33.patch","issue_url":"https://api.github.com/repos/nette/caching/issues/33","number":33,"state":"open","locked":false,"title":"FileStorage: Create subdirs when using the method derive","user":{"login":"radoslavius","id":3509024,"avatar_url":"https://avatars.githubusercontent.com/u/3509024?v=3","gravatar_id":"","url":"https://api.github.com/users/radoslavius","html_url":"https://github.com/radoslavius","followers_url":"https://api.github.com/users/radoslavius/followers","following_url":"https://api.github.com/users/radoslavius/following{/other_user}","gists_url":"https://api.github.com/users/radoslavius/gists{/gist_id}","starred_url":"https://api.github.com/users/radoslavius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radoslavius/subscriptions","organizations_url":"https://api.github.com/users/radoslavius/orgs","repos_url":"https://api.github.com/users/radoslavius/repos","events_url":"https://api.github.com/users/radoslavius/events{/privacy}","received_events_url":"https://api.github.com/users/radoslavius/received_events","type":"User","site_admin":false},"body":"I do not know if it was the intention, but this behavior seems to me better. Especially if there is a large number of cached files.","created_at":"2015-10-21T16:24:59Z","updated_at":"2016-01-13T20:36:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4ee6e8992c28aab7285877be55bf50244f66d23","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nette/caching/pulls/33/commits","review_comments_url":"https://api.github.com/repos/nette/caching/pulls/33/comments","review_comment_url":"https://api.github.com/repos/nette/caching/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nette/caching/issues/33/comments","statuses_url":"https://api.github.com/repos/nette/caching/statuses/3c74ebf23a19c8a5debadbe767e056d351d51197","head":{"label":"radoslavius:master","ref":"master","sha":"3c74ebf23a19c8a5debadbe767e056d351d51197","user":{"login":"radoslavius","id":3509024,"avatar_url":"https://avatars.githubusercontent.com/u/3509024?v=3","gravatar_id":"","url":"https://api.github.com/users/radoslavius","html_url":"https://github.com/radoslavius","followers_url":"https://api.github.com/users/radoslavius/followers","following_url":"https://api.github.com/users/radoslavius/following{/other_user}","gists_url":"https://api.github.com/users/radoslavius/gists{/gist_id}","starred_url":"https://api.github.com/users/radoslavius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radoslavius/subscriptions","organizations_url":"https://api.github.com/users/radoslavius/orgs","repos_url":"https://api.github.com/users/radoslavius/repos","events_url":"https://api.github.com/users/radoslavius/events{/privacy}","received_events_url":"https://api.github.com/users/radoslavius/received_events","type":"User","site_admin":false},"repo":{"id":44672992,"name":"caching","full_name":"radoslavius/caching","owner":{"login":"radoslavius","id":3509024,"avatar_url":"https://avatars.githubusercontent.com/u/3509024?v=3","gravatar_id":"","url":"https://api.github.com/users/radoslavius","html_url":"https://github.com/radoslavius","followers_url":"https://api.github.com/users/radoslavius/followers","following_url":"https://api.github.com/users/radoslavius/following{/other_user}","gists_url":"https://api.github.com/users/radoslavius/gists{/gist_id}","starred_url":"https://api.github.com/users/radoslavius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radoslavius/subscriptions","organizations_url":"https://api.github.com/users/radoslavius/orgs","repos_url":"https://api.github.com/users/radoslavius/repos","events_url":"https://api.github.com/users/radoslavius/events{/privacy}","received_events_url":"https://api.github.com/users/radoslavius/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/radoslavius/caching","description":"Cache layer with set of storages","fork":true,"url":"https://api.github.com/repos/radoslavius/caching","forks_url":"https://api.github.com/repos/radoslavius/caching/forks","keys_url":"https://api.github.com/repos/radoslavius/caching/keys{/key_id}","collaborators_url":"https://api.github.com/repos/radoslavius/caching/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/radoslavius/caching/teams","hooks_url":"https://api.github.com/repos/radoslavius/caching/hooks","issue_events_url":"https://api.github.com/repos/radoslavius/caching/issues/events{/number}","events_url":"https://api.github.com/repos/radoslavius/caching/events","assignees_url":"https://api.github.com/repos/radoslavius/caching/assignees{/user}","branches_url":"https://api.github.com/repos/radoslavius/caching/branches{/branch}","tags_url":"https://api.github.com/repos/radoslavius/caching/tags","blobs_url":"https://api.github.com/repos/radoslavius/caching/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/radoslavius/caching/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/radoslavius/caching/git/refs{/sha}","trees_url":"https://api.github.com/repos/radoslavius/caching/git/trees{/sha}","statuses_url":"https://api.github.com/repos/radoslavius/caching/statuses/{sha}","languages_url":"https://api.github.com/repos/radoslavius/caching/languages","stargazers_url":"https://api.github.com/repos/radoslavius/caching/stargazers","contributors_url":"https://api.github.com/repos/radoslavius/caching/contributors","subscribers_url":"https://api.github.com/repos/radoslavius/caching/subscribers","subscription_url":"https://api.github.com/repos/radoslavius/caching/subscription","commits_url":"https://api.github.com/repos/radoslavius/caching/commits{/sha}","git_commits_url":"https://api.github.com/repos/radoslavius/caching/git/commits{/sha}","comments_url":"https://api.github.com/repos/radoslavius/caching/comments{/number}","issue_comment_url":"https://api.github.com/repos/radoslavius/caching/issues/comments{/number}","contents_url":"https://api.github.com/repos/radoslavius/caching/contents/{+path}","compare_url":"https://api.github.com/repos/radoslavius/caching/compare/{base}...{head}","merges_url":"https://api.github.com/repos/radoslavius/caching/merges","archive_url":"https://api.github.com/repos/radoslavius/caching/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/radoslavius/caching/downloads","issues_url":"https://api.github.com/repos/radoslavius/caching/issues{/number}","pulls_url":"https://api.github.com/repos/radoslavius/caching/pulls{/number}","milestones_url":"https://api.github.com/repos/radoslavius/caching/milestones{/number}","notifications_url":"https://api.github.com/repos/radoslavius/caching/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/radoslavius/caching/labels{/name}","releases_url":"https://api.github.com/repos/radoslavius/caching/releases{/id}","created_at":"2015-10-21T11:57:04Z","updated_at":"2015-10-21T11:57:05Z","pushed_at":"2015-10-21T16:12:45Z","git_url":"git://github.com/radoslavius/caching.git","ssh_url":"git@github.com:radoslavius/caching.git","clone_url":"https://github.com/radoslavius/caching.git","svn_url":"https://github.com/radoslavius/caching","homepage":"https://nette.org","size":491,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nette:master","ref":"master","sha":"08bbedcb9569103126325023c67a3d5e6ea7d4bf","user":{"login":"nette","id":99965,"avatar_url":"https://avatars.githubusercontent.com/u/99965?v=3","gravatar_id":"","url":"https://api.github.com/users/nette","html_url":"https://github.com/nette","followers_url":"https://api.github.com/users/nette/followers","following_url":"https://api.github.com/users/nette/following{/other_user}","gists_url":"https://api.github.com/users/nette/gists{/gist_id}","starred_url":"https://api.github.com/users/nette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nette/subscriptions","organizations_url":"https://api.github.com/users/nette/orgs","repos_url":"https://api.github.com/users/nette/repos","events_url":"https://api.github.com/users/nette/events{/privacy}","received_events_url":"https://api.github.com/users/nette/received_events","type":"Organization","site_admin":false},"repo":{"id":17693928,"name":"caching","full_name":"nette/caching","owner":{"login":"nette","id":99965,"avatar_url":"https://avatars.githubusercontent.com/u/99965?v=3","gravatar_id":"","url":"https://api.github.com/users/nette","html_url":"https://github.com/nette","followers_url":"https://api.github.com/users/nette/followers","following_url":"https://api.github.com/users/nette/following{/other_user}","gists_url":"https://api.github.com/users/nette/gists{/gist_id}","starred_url":"https://api.github.com/users/nette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nette/subscriptions","organizations_url":"https://api.github.com/users/nette/orgs","repos_url":"https://api.github.com/users/nette/repos","events_url":"https://api.github.com/users/nette/events{/privacy}","received_events_url":"https://api.github.com/users/nette/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nette/caching","description":"Cache layer with set of storages","fork":false,"url":"https://api.github.com/repos/nette/caching","forks_url":"https://api.github.com/repos/nette/caching/forks","keys_url":"https://api.github.com/repos/nette/caching/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nette/caching/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nette/caching/teams","hooks_url":"https://api.github.com/repos/nette/caching/hooks","issue_events_url":"https://api.github.com/repos/nette/caching/issues/events{/number}","events_url":"https://api.github.com/repos/nette/caching/events","assignees_url":"https://api.github.com/repos/nette/caching/assignees{/user}","branches_url":"https://api.github.com/repos/nette/caching/branches{/branch}","tags_url":"https://api.github.com/repos/nette/caching/tags","blobs_url":"https://api.github.com/repos/nette/caching/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nette/caching/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nette/caching/git/refs{/sha}","trees_url":"https://api.github.com/repos/nette/caching/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nette/caching/statuses/{sha}","languages_url":"https://api.github.com/repos/nette/caching/languages","stargazers_url":"https://api.github.com/repos/nette/caching/stargazers","contributors_url":"https://api.github.com/repos/nette/caching/contributors","subscribers_url":"https://api.github.com/repos/nette/caching/subscribers","subscription_url":"https://api.github.com/repos/nette/caching/subscription","commits_url":"https://api.github.com/repos/nette/caching/commits{/sha}","git_commits_url":"https://api.github.com/repos/nette/caching/git/commits{/sha}","comments_url":"https://api.github.com/repos/nette/caching/comments{/number}","issue_comment_url":"https://api.github.com/repos/nette/caching/issues/comments{/number}","contents_url":"https://api.github.com/repos/nette/caching/contents/{+path}","compare_url":"https://api.github.com/repos/nette/caching/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nette/caching/merges","archive_url":"https://api.github.com/repos/nette/caching/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nette/caching/downloads","issues_url":"https://api.github.com/repos/nette/caching/issues{/number}","pulls_url":"https://api.github.com/repos/nette/caching/pulls{/number}","milestones_url":"https://api.github.com/repos/nette/caching/milestones{/number}","notifications_url":"https://api.github.com/repos/nette/caching/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nette/caching/labels{/name}","releases_url":"https://api.github.com/repos/nette/caching/releases{/id}","created_at":"2014-03-13T03:43:57Z","updated_at":"2016-01-10T22:35:43Z","pushed_at":"2015-12-03T01:45:58Z","git_url":"git://github.com/nette/caching.git","ssh_url":"git@github.com:nette/caching.git","clone_url":"https://github.com/nette/caching.git","svn_url":"https://github.com/nette/caching","homepage":"https://nette.org","size":450,"stargazers_count":74,"watchers_count":74,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":6,"forks":22,"open_issues":6,"watchers":74,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nette/caching/pulls/33"},"html":{"href":"https://github.com/nette/caching/pull/33"},"issue":{"href":"https://api.github.com/repos/nette/caching/issues/33"},"comments":{"href":"https://api.github.com/repos/nette/caching/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/nette/caching/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/nette/caching/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nette/caching/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/nette/caching/statuses/3c74ebf23a19c8a5debadbe767e056d351d51197"}}}}