{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/11565","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11565/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11565/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11565/events","html_url":"https://github.com/joomla/joomla-cms/pull/11565","id":170772098,"number":11565,"title":"Fix broken memcache storage on J3.6.2, refresh code","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":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2016-08-11T23:44:22Z","updated_at":"2016-08-17T16:50:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/11565","html_url":"https://github.com/joomla/joomla-cms/pull/11565","diff_url":"https://github.com/joomla/joomla-cms/pull/11565.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/11565.patch"},"body":"Pull Request for Issue (Not yet)\r\n\r\n#### Summary\r\n\r\nCache storage memcache from J3.6.2 is not working.\r\nThis PR fix that.\r\n\r\nThis is part of  another (more optimized) PR #10565. \r\n\r\n#### Summary of Changes\r\n\r\n[UPDATED]\r\n\r\n1) Fix compression issue.\r\nBefore only first instance of memcache can set compression to true on `getConnection` method.\r\nNext instances did not call `getConnection` and then did not use compression at all.\r\nMove `$this->_compress = ...` to consctructor.\r\n\r\nhttps://github.com/joomla/joomla-cms/pull/11565/files#diff-8104780960bee59ef8a377ffd818797aR47\r\n\r\n2) Check `static::$_db === null` before `isSupported()`. \r\nIf connection exists then skip call `isSupported` and do not create useless connections.\r\nhttps://github.com/joomla/joomla-cms/pull/11565/files#diff-8104780960bee59ef8a377ffd818797aL55\r\n\r\n3) Fix persistent connection. Remove test connection which break persistent.\r\nhttps://github.com/joomla/joomla-cms/pull/11565/files#diff-8104780960bee59ef8a377ffd818797aL79\r\n\r\n4) Remove race condition. We do not need to initiate empty list.\r\nhttps://github.com/joomla/joomla-cms/pull/11565/files#diff-8104780960bee59ef8a377ffd818797aL89\r\n\r\n5) Joomla uses only one memcache server. Remove `replace` and use only `set` method.\r\nhttps://github.com/joomla/joomla-cms/pull/11565/files#diff-8104780960bee59ef8a377ffd818797aL194\r\n\r\n6) Fix `remove` method. Search in all list instead of in first item only.\r\nhttps://github.com/joomla/joomla-cms/pull/11565/files#diff-8104780960bee59ef8a377ffd818797aL236\r\n\r\n7) Do not test connection in `isSupported` method https://github.com/joomla/joomla-cms/pull/11565/files#diff-8104780960bee59ef8a377ffd818797aR290\r\n\r\n* In global configuration we should have an option to set another custom port if default does not work.\r\n\r\n8) Do not lock twice. Do not call `lockindex` for `lock`/'unlock' method.\r\nhttps://github.com/joomla/joomla-cms/pull/11565/files#diff-8104780960bee59ef8a377ffd818797aL334\r\nhttps://github.com/joomla/joomla-cms/pull/11565/files#diff-8104780960bee59ef8a377ffd818797aL394\r\n\r\n9) Fix `locklooped`.\r\nhttps://github.com/joomla/joomla-cms/pull/11565/files#diff-8104780960bee59ef8a377ffd818797aR334\r\n\r\nhttps://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/cache/controller/callback.php#L99\r\n\r\n\r\n#### Testing Instructions\r\nOn Joomla 3.6.2 try to use Cache handler MemcachE - it does not work\r\nAfter patch it start working.\r\n\r\n#### Others\r\n\r\n1) I tested that PR also on php7.0 from Kubuntu 16.04 with php-memcache 3.0.9 and it is working. More info at https://github.com/websupport-sk/pecl-memcache\r\n\r\n2) On my laptop (Kubuntu 16.04) hhvm works too.\r\n\r\n\r\n#### Documentation Changes Required\r\nNo.\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/240474087","html_url":"https://github.com/joomla/joomla-cms/pull/11565#issuecomment-240474087","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11565","id":240474087,"user":{"login":"photodude","id":10253980,"avatar_url":"https://avatars.githubusercontent.com/u/10253980?v=3","gravatar_id":"","url":"https://api.github.com/users/photodude","html_url":"https://github.com/photodude","followers_url":"https://api.github.com/users/photodude/followers","following_url":"https://api.github.com/users/photodude/following{/other_user}","gists_url":"https://api.github.com/users/photodude/gists{/gist_id}","starred_url":"https://api.github.com/users/photodude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/photodude/subscriptions","organizations_url":"https://api.github.com/users/photodude/orgs","repos_url":"https://api.github.com/users/photodude/repos","events_url":"https://api.github.com/users/photodude/events{/privacy}","received_events_url":"https://api.github.com/users/photodude/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T16:50:08Z","updated_at":"2016-08-17T16:50:08Z","body":"There is no current need for users to test against HHVM for code acceptance, same with php7.1. these are allowed failures in the unit tests while we make necessary code changes to add support. \r\n\r\nCode changes for HHVM and PHP 7.1 just need to check that they do not break existing supported PHP versions. "}}
{"actor":{"display_login":"photodude"}}