8000 Update cache.rst · matthieu88160/symfony-docs@1f370ca · GitHub
[go: up one dir, main page]

Skip to content

Commit 1f370ca

Browse files
andreyboloninxabbuh
authored andcommitted
Update cache.rst
1 parent e50484b commit 1f370ca

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

components/cache.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ meaning of some key concepts:
3737
**Adapter**
3838
It implements the actual caching mechanism to store the information in the
3939
filesystem, in a database, etc. The component provides several ready to use
40-
adapters for common caching backends (Redis, APCu, etc.)
40+
adapters for common caching backends (Redis, APCu, Doctrine, Filesystem, PDO)
4141

4242
Basic Usage
4343
-----------
@@ -70,6 +70,14 @@ Now you can create, retrieve, update and delete items using this cache pool::
7070

7171
// remove the cache item
7272
$cache->deleteItem('stats.num_products');
73+
74+
Or you can use redis-based cache, instantiate :class:`Symfony\\Component\\Cache\\Adapter\\RedisAdapter`::
75+
76+
use Symfony\Component\Cache\Adapter\RedisAdapter;
77+
78+
$connection = RedisAdapter::createConnection('redis://127.0.0.1:6379/0');
79+
$cache = new RedisAdapter($connection);
80+
7381

7482
Advanced Usage
7583
--------------

0 commit comments

Comments
 (0)
0