{"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"},{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/Unit/System%20Tests","name":"Unit/System Tests","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":52,"created_at":"2016-08-11T23:44:22Z","updated_at":"2016-08-18T22:19:15Z","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\nI also add the same changes to memcached.\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\n10) Add `protected function _getCacheId($id, $group)` to memcache(-d).\r\nIf mobile user want to delete all cache data and 'Platform specific caching' in Global Configuration->Cache Settings is enabled then before that patch it does not work correctly.\r\n\r\n#### Testing Instructions\r\nOn Joomla 3.6.2 try to use Cache handler MemcachE\r\nBefore patch it does not work.\r\nAfter patch it start working.\r\n\r\nAlso do test for MemcacheD.\r\n\r\n[UPDATED]\r\n\r\nStep by step how to test on demo.joomla.org \r\nhttps://github.com/joomla/joomla-cms/pull/11565#issuecomment-240566785\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/240874557","html_url":"https://github.com/joomla/joomla-cms/pull/11565#issuecomment-240874557","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11565","id":240874557,"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},"created_at":"2016-08-18T22:19:15Z","updated_at":"2016-08-18T22:19:15Z","body":"Yes but only for that key=`$this->_hash . '-index'`.\r\nFor other keys it may be string as valid data."}}
{"actor":{"display_login":"csthomas"}}