{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments/63296541","id":63296541,"diff_hunk":"@@ -0,0 +1,243 @@\n+.. index::\n+   single: Cache Pool\n+   single: APC Cache, APCu Cache\n+   single: Doctrine Cache\n+   single: Redis Cache\n+\n+Cache Pools\n+===========\n+\n+Cache Pools are the logical repositories of cache items. They perform all the\n+common operations on items, such as saving them or looking for them. Cache pools\n+are independent from the actual cache implementation. Therefore, applications\n+can keep using the same cache pool even if the underlying cache mechanism\n+changes from a file system based cache to a Redis or database based cache.\n+\n+Creating Cache Pools\n+--------------------\n+\n+Cache Pools are created through the **cache adapters**, which are classes that\n+implement the :class:`Psr\\\\Cache\\\\CacheItemPoolInterface` interface. This\n+component provides several adapters ready to use in your applications.\n+\n+Array Cache Adapter\n+~~~~~~~~~~~~~~~~~~~\n+\n+This adapter is only useful for testing purposes because contents are stored in\n+memory and not persisted in any way. Besides, some features explained later are\n+not available, such as the deferred saves::\n+\n+    use Symfony\\Component\\Cache\\Adapter\\ArrayAdapter;\n+\n+    $cache = new ArrayAdapter(\n+        // in seconds; applied to cache items that don't define their own lifetime\n+        // 0 means to store the cache items indefinitely (i.e. until the current PHP process finishes)\n+        $defaultLifetime = 0,\n+        // if ``true``, the values saved in the cache are serialized before storing them\n+        $storeSerialized = true\n+    );\n+\n+Filesystem Cache Adapter\n+~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+This adapter is useful when you want to improve the application performance but\n+can't install tools like APC or Redis in the server. This adapter stores the\n+contents as regular files in a set of directories on the local file system::\n+\n+    use Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter;\n+\n+    $cache = new FilesystemAdapter(\n+        // the subdirectory of the main cache directory where cache items are stored\n+        $namespace = '',\n+        // in seconds; applied to cache items that don't define their own lifetime\n+        // 0 means to store the cache items indefinitely (i.e. until the files are deleted)\n+        $defaultLifetime = 0,\n+        // the main cache directory (the application needs read-write permissions on it)\n+        // if none is specified, a directory is created inside the system temporary directory\n+        $directory = null\n+    );\n+\n+APCu Cache Adapter\n+~~~~~~~~~~~~~~~~~~\n+\n+This adapter can increase the application performance very significantly, because\n+contents are cached in the memory of your server, which is much faster than the\n+file system. It requires to have installed and enabled the PHP APC extension.\n+It's not recommended to use it when performing lots of write and delete\n+operations because it produces fragmentation in the APCu memory and that\n+degrades performance significantly::\n+\n+    use Symfony\\Component\\Cache\\Adapter\\ApcuAdapter;\n+\n+    $cache = new ApcuAdapter(\n+        // the string prefixed to the keys of the items stored in this cache\n+        $namespace = '',\n+        // in seconds; applied to cache items that don't define their own lifetime\n+        // 0 means to store the cache items indefinitely (i.e. until the APC memory is deleted)\n+        $defaultLifetime = 0\n+    );\n+\n+Redis Cache Adapter\n+~~~~~~~~~~~~~~~~~~~\n+\n+This adapter, similarly to APCu adapter, can increase the application performance\n+very significantly, because contents are cached in the memory of your server. It\n+requires to have installed Redis and have created a connection that implements\n+the ``\\Redis`` class::","path":"components/cache/cache_pools.rst","position":86,"original_position":86,"commit_id":"930a2d1d5c5899b37e2efac3638afe70c6a637ba","original_commit_id":"930a2d1d5c5899b37e2efac3638afe70c6a637ba","user":{"login":"nicolas-grekas","id":243674,"avatar_url":"https://avatars.githubusercontent.com/u/243674?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolas-grekas","html_url":"https://github.com/nicolas-grekas","followers_url":"https://api.github.com/users/nicolas-grekas/followers","following_url":"https://api.github.com/users/nicolas-grekas/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-grekas/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-grekas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-grekas/subscriptions","organizations_url":"https://api.github.com/users/nicolas-grekas/orgs","repos_url":"https://api.github.com/users/nicolas-grekas/repos","events_url":"https://api.github.com/users/nicolas-grekas/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-grekas/received_events","type":"User","site_admin":false},"body":"Redis, RedisArray, RedisCluster or Predis are accepted now","created_at":"2016-05-15T19:15:47Z","updated_at":"2016-05-15T19:15:47Z","html_url":"https://github.com/symfony/symfony-docs/pull/6515#discussion_r63296541","pull_request_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/6515","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments/63296541"},"html":{"href":"https://github.com/symfony/symfony-docs/pull/6515#discussion_r63296541"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/6515"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/6515","id":67705038,"html_url":"https://github.com/symfony/symfony-docs/pull/6515","diff_url":"https://github.com/symfony/symfony-docs/pull/6515.diff","patch_url":"https://github.com/symfony/symfony-docs/pull/6515.patch","issue_url":"https://api.github.com/repos/symfony/symfony-docs/issues/6515","number":6515,"state":"open","locked":false,"title":"Added the documentation for the Cache component","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"body":"This fixes #6171.\r\n\r\nThis is WIP because there's more documentation to come ... but you can already review the proposed documentation. Thanks!","created_at":"2016-04-25T11:37:15Z","updated_at":"2016-05-15T19:15:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"38f5551200208b40cc14c76d5aa9eb39828ed312","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/6515/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/6515/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/issues/6515/comments","statuses_url":"https://api.github.com/repos/symfony/symfony-docs/statuses/930a2d1d5c5899b37e2efac3638afe70c6a637ba","head":{"label":"javiereguiluz:cache_component","ref":"cache_component","sha":"930a2d1d5c5899b37e2efac3638afe70c6a637ba","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"repo":{"id":26866700,"name":"symfony-docs","full_name":"javiereguiluz/symfony-docs","owner":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/javiereguiluz/symfony-docs","description":"The Symfony2 documentation","fork":true,"url":"https://api.github.com/repos/javiereguiluz/symfony-docs","forks_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/forks","keys_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/teams","hooks_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/hooks","issue_events_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/issues/events{/number}","events_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/events","assignees_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/assignees{/user}","branches_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/branches{/branch}","tags_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/tags","blobs_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/languages","stargazers_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/stargazers","contributors_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/contributors","subscribers_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/subscribers","subscription_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/subscription","commits_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/contents/{+path}","compare_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/merges","archive_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/downloads","issues_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/issues{/number}","pulls_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/labels{/name}","releases_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/releases{/id}","deployments_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/deployments","created_at":"2014-11-19T15:08:31Z","updated_at":"2016-04-05T15:03:48Z","pushed_at":"2016-05-09T14:56:51Z","git_url":"git://github.com/javiereguiluz/symfony-docs.git","ssh_url":"git@github.com:javiereguiluz/symfony-docs.git","clone_url":"https://github.com/javiereguiluz/symfony-docs.git","svn_url":"https://github.com/javiereguiluz/symfony-docs","homepage":"http://symfony.com/doc/current/","size":34924,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":false,"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":"symfony:master","ref":"master","sha":"90b1a093cf806ce012f8663744d0ee2f28cc3b11","user":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"repo":{"id":521583,"name":"symfony-docs","full_name":"symfony/symfony-docs","owner":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony/symfony-docs","description":"The Symfony documentation","fork":false,"url":"https://api.github.com/repos/symfony/symfony-docs","forks_url":"https://api.github.com/repos/symfony/symfony-docs/forks","keys_url":"https://api.github.com/repos/symfony/symfony-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony-docs/teams","hooks_url":"https://api.github.com/repos/symfony/symfony-docs/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony-docs/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony-docs/events","assignees_url":"https://api.github.com/repos/symfony/symfony-docs/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony-docs/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony-docs/tags","blobs_url":"https://api.github.com/repos/symfony/symfony-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony-docs/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony-docs/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony-docs/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony-docs/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony-docs/subscription","commits_url":"https://api.github.com/repos/symfony/symfony-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony-docs/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony-docs/merges","archive_url":"https://api.github.com/repos/symfony/symfony-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony-docs/downloads","issues_url":"https://api.github.com/repos/symfony/symfony-docs/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony-docs/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony-docs/releases{/id}","deployments_url":"https://api.github.com/repos/symfony/symfony-docs/deployments","created_at":"2010-02-17T08:43:51Z","updated_at":"2016-05-13T14:19:09Z","pushed_at":"2016-05-15T07:10:50Z","git_url":"git://github.com/symfony/symfony-docs.git","ssh_url":"git@github.com:symfony/symfony-docs.git","clone_url":"https://github.com/symfony/symfony-docs.git","svn_url":"https://github.com/symfony/symfony-docs","homepage":"http://symfony.com/doc","size":55063,"stargazers_count":1105,"watchers_count":1105,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2411,"mirror_url":null,"open_issues_count":318,"forks":2411,"open_issues":318,"watchers":1105,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/6515"},"html":{"href":"https://github.com/symfony/symfony-docs/pull/6515"},"issue":{"href":"https://api.github.com/repos/symfony/symfony-docs/issues/6515"},"comments":{"href":"https://api.github.com/repos/symfony/symfony-docs/issues/6515/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/6515/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/6515/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony-docs/statuses/930a2d1d5c5899b37e2efac3638afe70c6a637ba"}}}}