{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/10767","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/10767/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/10767/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/10767/events","html_url":"https://github.com/joomla/joomla-cms/pull/10767","id":159355014,"number":10767,"title":"Remove uslep(100) from first call of cache->get in file handler","user":{"login":"csthomas","id":9054379,"avatar_url":"https://avatars.githubusercontent.com/u/9054379?v=3","gravatar_id":"","url":"https://api.github.com/users/csthomas","html_url":"https://github.com/csthomas","followers_url":"https://api.github.com/users/csthomas/followers","following_url":"https://api.github.com/users/csthomas/following{/other_user}","gists_url":"https://api.github.com/users/csthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/csthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csthomas/subscriptions","organizations_url":"https://api.github.com/users/csthomas/orgs","repos_url":"https://api.github.com/users/csthomas/repos","events_url":"https://api.github.com/users/csthomas/events{/privacy}","received_events_url":"https://api.github.com/users/csthomas/received_events","type":"User","site_admin":false},"labels":[{"id":60721348,"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8","default":false},{"id":38040572,"url":"https://api.github.com/repos/joomla/joomla-cms/labels/Unit/System%20Tests","name":"Unit/System Tests","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-06-09T08:38:55Z","updated_at":"2017-02-03T18:46:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/10767","html_url":"https://github.com/joomla/joomla-cms/pull/10767","diff_url":"https://github.com/joomla/joomla-cms/pull/10767.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/10767.patch"},"body":"Pull Request for Issue #10706.\r\n#### Summary of Changes\r\n\r\n1) Eliminate usleep(100) when cache file does not exist.\r\n2) Do not call `flock()` if the file does not exist, replace flag `r+b` to `c+b` in `fopen` function.\r\n3) Do not allow to release lock, remember `$_fileopen` resource in $this->_locked_files variable.\r\n4) At `unlock()` do not re-open cache file, but release lock only.\r\n\r\n#### Testing Instructions\r\n\r\nCode review.\r\nOr standard test below.\r\n\r\n**Before patch.**\r\n1) Enable cache and set cache handler to File,\r\n2) Replace line 309 in `libraries/joomla/cache/storage/file.php` ( https://github.com/joomla/joomla-cms/pull/10767/files#diff-056f1b3f5ee42d2b80e891d375789137L309 )\r\nfrom:\r\n``` php\r\nusleep(100);\r\n```\r\n\r\nto \r\n\r\n``` php\r\nusleep(100); JLog::add(\"Joomla call usleep!!!\", JLog::WARNING, 'jerror');\r\n```\r\n\r\n3) Remove all files from `cache`. Clear cache.\r\n4) Now go to front-end.\r\n5) You should see \"Joomla call usleep!!!\"\r\n\r\n**After patch** do the same but \r\nat point 5 you should not see \"Joomla call usleep!!!\"\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/277328633","html_url":"https://github.com/joomla/joomla-cms/pull/10767#issuecomment-277328633","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/10767","id":277328633,"user":{"login":"franz-wohlkoenig","id":8235763,"avatar_url":"https://avatars.githubusercontent.com/u/8235763?v=3","gravatar_id":"","url":"https://api.github.com/users/franz-wohlkoenig","html_url":"https://github.com/franz-wohlkoenig","followers_url":"https://api.github.com/users/franz-wohlkoenig/followers","following_url":"https://api.github.com/users/franz-wohlkoenig/following{/other_user}","gists_url":"https://api.github.com/users/franz-wohlkoenig/gists{/gist_id}","starred_url":"https://api.github.com/users/franz-wohlkoenig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franz-wohlkoenig/subscriptions","organizations_url":"https://api.github.com/users/franz-wohlkoenig/orgs","repos_url":"https://api.github.com/users/franz-wohlkoenig/repos","events_url":"https://api.github.com/users/franz-wohlkoenig/events{/privacy}","received_events_url":"https://api.github.com/users/franz-wohlkoenig/received_events","type":"User","site_admin":false},"created_at":"2017-02-03T18:46:46Z","updated_at":"2017-02-03T18:46:46Z","body":"will do"}}
{"actor":{"display_login":"franz-wohlkoenig"}}