{"action":"created","comment":{"url":"https://api.github.com/repos/neos/flow-development-collection/pulls/comments/89363562","pull_request_review_id":9909789,"id":89363562,"diff_hunk":"@@ -260,14 +255,23 @@ public function remove($entryIdentifier)\n \n         $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;\n \n-        try {\n-            $lock = new Lock($pathAndFilename);\n-            unlink($pathAndFilename);\n-            $lock->release();\n-        } catch (\\Exception $exception) {\n+        if (strncasecmp(PHP_OS, 'WIN', 3) == 0) {\n+            // On Windows, unlinking a locked/opened file will not work, so we just attempt the delete straight away.\n+            // In the worst case, the unlink will just fail due to concurrent access and the caller needs to deal with that.\n+            return @unlink($pathAndFilename);\n+        }\n+\n+        $file = @fopen($pathAndFilename, 'r');\n+        if ($file === false) {","path":"TYPO3.Flow/Classes/TYPO3/Flow/Cache/Backend/SimpleFileBackend.php","position":37,"original_position":37,"commit_id":"68c965da1610aa18495fed3502236f527d67603b","original_commit_id":"68c965da1610aa18495fed3502236f527d67603b","user":{"login":"robertlemke","id":95582,"avatar_url":"https://avatars.githubusercontent.com/u/95582?v=3","gravatar_id":"","url":"https://api.github.com/users/robertlemke","html_url":"https://github.com/robertlemke","followers_url":"https://api.github.com/users/robertlemke/followers","following_url":"https://api.github.com/users/robertlemke/following{/other_user}","gists_url":"https://api.github.com/users/robertlemke/gists{/gist_id}","starred_url":"https://api.github.com/users/robertlemke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertlemke/subscriptions","organizations_url":"https://api.github.com/users/robertlemke/orgs","repos_url":"https://api.github.com/users/robertlemke/repos","events_url":"https://api.github.com/users/robertlemke/events{/privacy}","received_events_url":"https://api.github.com/users/robertlemke/received_events","type":"User","site_admin":false},"body":"I have concerns about the shut-up-operator – wouldn't `try`/`catch` work here?\r\n\r\nIt's a bit of history repeating – we had this several times in and out in similar places, see also https://karsten.dambekalns.de/blog/a-story-about-include-once.html\r\n\r\nSo, don't rush this until we're really sure.","created_at":"2016-11-23T17:27:46Z","updated_at":"2016-11-23T17:28:48Z","html_url":"https://github.com/neos/flow-development-collection/pull/417#discussion_r89363562","pull_request_url":"https://api.github.com/repos/neos/flow-development-collection/pulls/417","_links":{"self":{"href":"https://api.github.com/repos/neos/flow-development-collection/pulls/comments/89363562"},"html":{"href":"https://github.com/neos/flow-development-collection/pull/417#discussion_r89363562"},"pull_request":{"href":"https://api.github.com/repos/neos/flow-development-collection/pulls/417"}}},"pull_request":{"url":"https://api.github.com/repos/neos/flow-development-collection/pulls/417","id":80984011,"html_url":"https://github.com/neos/flow-development-collection/pull/417","diff_url":"https://github.com/neos/flow-development-collection/pull/417.diff","patch_url":"https://github.com/neos/flow-development-collection/pull/417.patch","issue_url":"https://api.github.com/repos/neos/flow-development-collection/issues/417","number":417,"state":"open","locked":false,"title":"FEATURE: Make Cache FileBackends independent of external locks","user":{"login":"albe","id":4259532,"avatar_url":"https://avatars.githubusercontent.com/u/4259532?v=3","gravatar_id":"","url":"https://api.github.com/users/albe","html_url":"https://github.com/albe","followers_url":"https://api.github.com/users/albe/followers","following_url":"https://api.github.com/users/albe/following{/other_user}","gists_url":"https://api.github.com/users/albe/gists{/gist_id}","starred_url":"https://api.github.com/users/albe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albe/subscriptions","organizations_url":"https://api.github.com/users/albe/orgs","repos_url":"https://api.github.com/users/albe/repos","events_url":"https://api.github.com/users/albe/events{/privacy}","received_events_url":"https://api.github.com/users/albe/received_events","type":"User","site_admin":false},"body":"This avoids using external locks, which are prone to platform issues\n(race conditions and tombstones for lock files or missing semaphore extension)\nand instead directly uses the file locking mechanism of PHP to lock the cache files.\n\nThis should noticeably improve performance for the FileBackend caches and avoid\nhaving thousands of Lock files which clobber the file system.\n","created_at":"2016-08-11T16:00:44Z","updated_at":"2016-11-23T17:28:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83951180884c3fde6921e56283f82f7f64515ea1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/neos/flow-development-collection/pulls/417/commits","review_comments_url":"https://api.github.com/repos/neos/flow-development-collection/pulls/417/comments","review_comment_url":"https://api.github.com/repos/neos/flow-development-collection/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neos/flow-development-collection/issues/417/comments","statuses_url":"https://api.github.com/repos/neos/flow-development-collection/statuses/68c965da1610aa18495fed3502236f527d67603b","head":{"label":"albe:flock_filecaches","ref":"flock_filecaches","sha":"68c965da1610aa18495fed3502236f527d67603b","user":{"login":"albe","id":4259532,"avatar_url":"https://avatars.githubusercontent.com/u/4259532?v=3","gravatar_id":"","url":"https://api.github.com/users/albe","html_url":"https://github.com/albe","followers_url":"https://api.github.com/users/albe/followers","following_url":"https://api.github.com/users/albe/following{/other_user}","gists_url":"https://api.github.com/users/albe/gists{/gist_id}","starred_url":"https://api.github.com/users/albe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albe/subscriptions","organizations_url":"https://api.github.com/users/albe/orgs","repos_url":"https://api.github.com/users/albe/repos","events_url":"https://api.github.com/users/albe/events{/privacy}","received_events_url":"https://api.github.com/users/albe/received_events","type":"User","site_admin":false},"repo":{"id":41612763,"name":"flow-development-collection","full_name":"albe/flow-development-collection","owner":{"login":"albe","id":4259532,"avatar_url":"https://avatars.githubusercontent.com/u/4259532?v=3","gravatar_id":"","url":"https://api.github.com/users/albe","html_url":"https://github.com/albe","followers_url":"https://api.github.com/users/albe/followers","following_url":"https://api.github.com/users/albe/following{/other_user}","gists_url":"https://api.github.com/users/albe/gists{/gist_id}","starred_url":"https://api.github.com/users/albe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albe/subscriptions","organizations_url":"https://api.github.com/users/albe/orgs","repos_url":"https://api.github.com/users/albe/repos","events_url":"https://api.github.com/users/albe/events{/privacy}","received_events_url":"https://api.github.com/users/albe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/albe/flow-development-collection","description":"The unified repository containing the Flow core packages, used for Flow development.","fork":true,"url":"https://api.github.com/repos/albe/flow-development-collection","forks_url":"https://api.github.com/repos/albe/flow-development-collection/forks","keys_url":"https://api.github.com/repos/albe/flow-development-collection/keys{/key_id}","collaborators_url":"https://api.github.com/repos/albe/flow-development-collection/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/albe/flow-development-collection/teams","hooks_url":"https://api.github.com/repos/albe/flow-development-collection/hooks","issue_events_url":"https://api.github.com/repos/albe/flow-development-collection/issues/events{/number}","events_url":"https://api.github.com/repos/albe/flow-development-collection/events","assignees_url":"https://api.github.com/repos/albe/flow-development-collection/assignees{/user}","branches_url":"https://api.github.com/repos/albe/flow-development-collection/branches{/branch}","tags_url":"https://api.github.com/repos/albe/flow-development-collection/tags","blobs_url":"https://api.github.com/repos/albe/flow-development-collection/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/albe/flow-development-collection/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/albe/flow-development-collection/git/refs{/sha}","trees_url":"https://api.github.com/repos/albe/flow-development-collection/git/trees{/sha}","statuses_url":"https://api.github.com/repos/albe/flow-development-collection/statuses/{sha}","languages_url":"https://api.github.com/repos/albe/flow-development-collection/languages","stargazers_url":"https://api.github.com/repos/albe/flow-development-collection/stargazers","contributors_url":"https://api.github.com/repos/albe/flow-development-collection/contributors","subscribers_url":"https://api.github.com/repos/albe/flow-development-collection/subscribers","subscription_url":"https://api.github.com/repos/albe/flow-development-collection/subscription","commits_url":"https://api.github.com/repos/albe/flow-development-collection/commits{/sha}","git_commits_url":"https://api.github.com/repos/albe/flow-development-collection/git/commits{/sha}","comments_url":"https://api.github.com/repos/albe/flow-development-collection/comments{/number}","issue_comment_url":"https://api.github.com/repos/albe/flow-development-collection/issues/comments{/number}","contents_url":"https://api.github.com/repos/albe/flow-development-collection/contents/{+path}","compare_url":"https://api.github.com/repos/albe/flow-development-collection/compare/{base}...{head}","merges_url":"https://api.github.com/repos/albe/flow-development-collection/merges","archive_url":"https://api.github.com/repos/albe/flow-development-collection/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/albe/flow-development-collection/downloads","issues_url":"https://api.github.com/repos/albe/flow-development-collection/issues{/number}","pulls_url":"https://api.github.com/repos/albe/flow-development-collection/pulls{/number}","milestones_url":"https://api.github.com/repos/albe/flow-development-collection/milestones{/number}","notifications_url":"https://api.github.com/repos/albe/flow-development-collection/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/albe/flow-development-collection/labels{/name}","releases_url":"https://api.github.com/repos/albe/flow-development-collection/releases{/id}","deployments_url":"https://api.github.com/repos/albe/flow-development-collection/deployments","created_at":"2015-08-30T01:29:22Z","updated_at":"2016-02-01T22:49:11Z","pushed_at":"2016-11-18T18:10:37Z","git_url":"git://github.com/albe/flow-development-collection.git","ssh_url":"git@github.com:albe/flow-development-collection.git","clone_url":"https://github.com/albe/flow-development-collection.git","svn_url":"https://github.com/albe/flow-development-collection","homepage":null,"size":37779,"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":"neos:3.3","ref":"3.3","sha":"ac632a62ef9e71b9fd35668b6330e6eaabc1acf3","user":{"login":"neos","id":11575267,"avatar_url":"https://avatars.githubusercontent.com/u/11575267?v=3","gravatar_id":"","url":"https://api.github.com/users/neos","html_url":"https://github.com/neos","followers_url":"https://api.github.com/users/neos/followers","following_url":"https://api.github.com/users/neos/following{/other_user}","gists_url":"https://api.github.com/users/neos/gists{/gist_id}","starred_url":"https://api.github.com/users/neos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neos/subscriptions","organizations_url":"https://api.github.com/users/neos/orgs","repos_url":"https://api.github.com/users/neos/repos","events_url":"https://api.github.com/users/neos/events{/privacy}","received_events_url":"https://api.github.com/users/neos/received_events","type":"Organization","site_admin":false},"repo":{"id":40963991,"name":"flow-development-collection","full_name":"neos/flow-development-collection","owner":{"login":"neos","id":11575267,"avatar_url":"https://avatars.githubusercontent.com/u/11575267?v=3","gravatar_id":"","url":"https://api.github.com/users/neos","html_url":"https://github.com/neos","followers_url":"https://api.github.com/users/neos/followers","following_url":"https://api.github.com/users/neos/following{/other_user}","gists_url":"https://api.github.com/users/neos/gists{/gist_id}","starred_url":"https://api.github.com/users/neos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neos/subscriptions","organizations_url":"https://api.github.com/users/neos/orgs","repos_url":"https://api.github.com/users/neos/repos","events_url":"https://api.github.com/users/neos/events{/privacy}","received_events_url":"https://api.github.com/users/neos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neos/flow-development-collection","description":"The unified repository containing the Flow core packages, used for Flow development.","fork":false,"url":"https://api.github.com/repos/neos/flow-development-collection","forks_url":"https://api.github.com/repos/neos/flow-development-collection/forks","keys_url":"https://api.github.com/repos/neos/flow-development-collection/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neos/flow-development-collection/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neos/flow-development-collection/teams","hooks_url":"https://api.github.com/repos/neos/flow-development-collection/hooks","issue_events_url":"https://api.github.com/repos/neos/flow-development-collection/issues/events{/number}","events_url":"https://api.github.com/repos/neos/flow-development-collection/events","assignees_url":"https://api.github.com/repos/neos/flow-development-collection/assignees{/user}","branches_url":"https://api.github.com/repos/neos/flow-development-collection/branches{/branch}","tags_url":"https://api.github.com/repos/neos/flow-development-collection/tags","blobs_url":"https://api.github.com/repos/neos/flow-development-collection/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neos/flow-development-collection/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neos/flow-development-collection/git/refs{/sha}","trees_url":"https://api.github.com/repos/neos/flow-development-collection/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neos/flow-development-collection/statuses/{sha}","languages_url":"https://api.github.com/repos/neos/flow-development-collection/languages","stargazers_url":"https://api.github.com/repos/neos/flow-development-collection/stargazers","contributors_url":"https://api.github.com/repos/neos/flow-development-collection/contributors","subscribers_url":"https://api.github.com/repos/neos/flow-development-collection/subscribers","subscription_url":"https://api.github.com/repos/neos/flow-development-collection/subscription","commits_url":"https://api.github.com/repos/neos/flow-development-collection/commits{/sha}","git_commits_url":"https://api.github.com/repos/neos/flow-development-collection/git/commits{/sha}","comments_url":"https://api.github.com/repos/neos/flow-development-collection/comments{/number}","issue_comment_url":"https://api.github.com/repos/neos/flow-development-collection/issues/comments{/number}","contents_url":"https://api.github.com/repos/neos/flow-development-collection/contents/{+path}","compare_url":"https://api.github.com/repos/neos/flow-development-collection/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neos/flow-development-collection/merges","archive_url":"https://api.github.com/repos/neos/flow-development-collection/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neos/flow-development-collection/downloads","issues_url":"https://api.github.com/repos/neos/flow-development-collection/issues{/number}","pulls_url":"https://api.github.com/repos/neos/flow-development-collection/pulls{/number}","milestones_url":"https://api.github.com/repos/neos/flow-development-collection/milestones{/number}","notifications_url":"https://api.github.com/repos/neos/flow-development-collection/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neos/flow-development-collection/labels{/name}","releases_url":"https://api.github.com/repos/neos/flow-development-collection/releases{/id}","deployments_url":"https://api.github.com/repos/neos/flow-development-collection/deployments","created_at":"2015-08-18T09:48:13Z","updated_at":"2016-10-27T08:57:47Z","pushed_at":"2016-11-23T17:19:38Z","git_url":"git://github.com/neos/flow-development-collection.git","ssh_url":"git@github.com:neos/flow-development-collection.git","clone_url":"https://github.com/neos/flow-development-collection.git","svn_url":"https://github.com/neos/flow-development-collection","homepage":"https://flow.neos.io/","size":39511,"stargazers_count":41,"watchers_count":41,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":180,"forks":85,"open_issues":180,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neos/flow-development-collection/pulls/417"},"html":{"href":"https://github.com/neos/flow-development-collection/pull/417"},"issue":{"href":"https://api.github.com/repos/neos/flow-development-collection/issues/417"},"comments":{"href":"https://api.github.com/repos/neos/flow-development-collection/issues/417/comments"},"review_comments":{"href":"https://api.github.com/repos/neos/flow-development-collection/pulls/417/comments"},"review_comment":{"href":"https://api.github.com/repos/neos/flow-development-collection/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neos/flow-development-collection/pulls/417/commits"},"statuses":{"href":"https://api.github.com/repos/neos/flow-development-collection/statuses/68c965da1610aa18495fed3502236f527d67603b"}}}}
{"actor":{"display_login":"robertlemke"}}