Skip to content

Commit 4e919c1

Browse files
committed
Merge branch '5.4' into 6.3
* 5.4: tweak the cache docs
2 parents 074ecc1 + 9ebf988 commit 4e919c1

12 files changed

+31
-50
lines changed

cache.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,19 @@ will create pools with service IDs that follow the pattern ``cache.[type]``.
146146
>
147147
<framework:config>
148148
<!--
149-
default_doctrine_dbal_provider: Service: cache.doctrine_dbal
150-
default_psr6_provider: Service: cache.psr6
151-
default_redis_provider: Service: cache.redis
152-
default_memcached_provider: Service: cache.memcached
153-
default_pdo_provider: Service: cache.pdo
149+
default-doctrine-dbal-provider: Service: cache.doctrine_dbal
150+
default-psr6-provider: Service: cache.psr6
151+
default-redis-provider: Service: cache.redis
152+
default-memcached-provider: Service: cache.memcached
153+
default-pdo-provider: Service: cache.pdo
154154
-->
155155
<!-- "directory" attribute is only used with cache.adapter.filesystem -->
156156
<framework:cache directory="%kernel.cache_dir%/pools"
157-
default_doctrine_dbal_provider="doctrine.dbal.default_connection"
158-
default_psr6_provider="app.my_psr6_service"
159-
default_redis_provider="redis://localhost"
160-
default_memcached_provider="memcached://localhost"
161-
default_pdo_provider="pgsql:host=localhost"
157+
default-doctrine-dbal-provider="doctrine.dbal.default_connection"
158+
default-psr6-provider="app.my_psr6_service"
159+
default-redis-provider="redis://localhost"
160+
default-memcached-provider="memcached://localhost"
161+
default-pdo-provider="pgsql:host=localhost"
162162
/>
163163
</framework:config>
164164
</container>

components/cache/adapters/apcu_adapter.rst

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _apcu-adapter:
2-
31
APCu Cache Adapter
42
==================
53

components/cache/adapters/chain_adapter.rst

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _component-cache-chain-adapter:
2-
31
Chain Cache Adapter
42
===================
53

components/cache/adapters/couchbasebucket_adapter.rst

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
.. _couchbase-adapter:
2-
31
Couchbase Bucket Cache Adapter
42
==============================
53

64
This adapter stores the values in-memory using one (or more) `Couchbase server`_
7-
instances. Unlike the :ref:`APCu adapter <apcu-adapter>`, and similarly to the
8-
:ref:`Memcached adapter <memcached-adapter>`, it is not limited to the current server's
5+
instances. Unlike the :doc:`APCu adapter </components/cache/adapters/apcu_adapter>`, and similarly to the
6+
:doc:`Memcached adapter </components/cache/adapters/memcached_adapter>`, it is not limited to the current server's
97
shared memory; you can store contents independent of your PHP environment.
108
The ability to utilize a cluster of servers to provide redundancy and/or fail-over
119
is also available.

components/cache/adapters/couchbasecollection_adapter.rst

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
.. _couchbase-collection-adapter:
2-
31
Couchbase Collection Cache Adapter
42
==================================
53

64
This adapter stores the values in-memory using one (or more) `Couchbase server`_
7-
instances. Unlike the :ref:`APCu adapter <apcu-adapter>`, and similarly to the
8-
:ref:`Memcached adapter <memcached-adapter>`, it is not limited to the current server's
5+
instances. Unlike the :doc:`APCu adapter </components/cache/adapters/apcu_adapter>`, and similarly to the
6+
:doc:`Memcached adapter </components/cache/adapters/memcached_adapter>`, it is not limited to the current server's
97
shared memory; you can store contents independent of your PHP environment.
108
The ability to utilize a cluster of servers to provide redundancy and/or fail-over
119
is also available.

components/cache/adapters/doctrine_dbal_adapter.rst

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _doctrine-dbal-adapter:
2-
31
Doctrine DBAL Cache Adapter
42
===========================
53

components/cache/adapters/filesystem_adapter.rst

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
.. _component-cache-filesystem-adapter:
2-
31
Filesystem Cache Adapter
42
========================
53

64
This adapter offers improved application performance for those who cannot install
7-
tools like :ref:`APCu <apcu-adapter>` or :ref:`Redis <redis-adapter>` in their
5+
tools like :doc:`APCu </components/cache/adapters/apcu_adapter>` or :doc:`Redis </components/cache/adapters/redis_adapter>` in their
86
environment. It stores the cache item expiration and content as regular files in
97
a collection of directories on a locally mounted filesystem.
108

@@ -39,9 +37,10 @@ and cache root path as constructor parameters::
3937

4038
The overhead of filesystem IO often makes this adapter one of the *slower*
4139
choices. If throughput is paramount, the in-memory adapters
42-
(:ref:`Apcu <apcu-adapter>`, :ref:`Memcached <memcached-adapter>`, and
43-
:ref:`Redis <redis-adapter>`) or the database adapters
44-
(:ref:`Doctrine DBAL <doctrine-dbal-adapter>`, :ref:`PDO <pdo-adapter>`) are recommended.
40+
(:doc:`Apcu </components/cache/adapters/apcu_adapter>`, :doc:`Memcached </components/cache/adapters/memcached_adapter>`,
41+
and :doc:`Redis </components/cache/adapters/redis_adapter>`) or the database adapters
42+
(:doc:`Doctrine DBAL </components/cache/adapters/doctrine_dbal_adapter>`, :doc:`PDO </components/cache/adapters/pdo_adapter>`)
43+
are recommended.
4544

4645
.. note::
4746

components/cache/adapters/memcached_adapter.rst

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
.. _memcached-adapter:
2-
31
Memcached Cache Adapter
42
=======================
53

64
This adapter stores the values in-memory using one (or more) `Memcached server`_
7-
instances. Unlike the :ref:`APCu adapter <apcu-adapter>`, and similarly to the
8-
:ref:`Redis adapter <redis-adapter>`, it is not limited to the current server's
5+
instances. Unlike the :doc:`APCu adapter </components/cache/adapters/apcu_adapter>`, and similarly to the
6+
:doc:`Redis adapter </components/cache/adapters/redis_adapter>`, it is not limited to the current server's
97
shared memory; you can store contents independent of your PHP environment.
108
The ability to utilize a cluster of servers to provide redundancy and/or fail-over
119
is also available.

components/cache/adapters/pdo_adapter.rst

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _pdo-adapter:
2-
31
PDO Cache Adapter
42
=================
53

components/cache/adapters/php_files_adapter.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
.. _component-cache-files-adapter:
2-
31
PHP Files Cache Adapter
42
=======================
53

6-
Similarly to :ref:`Filesystem Adapter <component-cache-filesystem-adapter>`, this cache
4+
Similarly to :doc:`Filesystem Adapter </components/cache/adapters/filesystem_adapter>`, this cache
75
implementation writes cache entries out to disk, but unlike the Filesystem cache adapter,
86
the PHP Files cache adapter writes and reads back these cache files *as native PHP code*.
97
For example, caching the value ``['my', 'cached', 'array']`` will write out a cache

components/cache/adapters/redis_adapter.rst

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _redis-adapter:
2-
31
Redis Cache Adapter
42
===================
53

@@ -12,8 +10,8 @@ Redis Cache Adapter
1210

1311
This adapter stores the values in-memory using one (or more) `Redis server`_ instances.
1412

15-
Unlike the :ref:`APCu adapter <apcu-adapter>`, and similarly to the
16-
:ref:`Memcached adapter <memcached-adapter>`, it is not limited to the current server's
13+
Unlike the :doc:`APCu adapter </components/cache/adapters/apcu_adapter>`, and similarly to the
14+
:doc:`Memcached adapter </components/cache/adapters/memcached_adapter>`, it is not limited to the current server's
1715
shared memory; you can store contents independent of your PHP environment. The ability
1816
to utilize a cluster of servers to provide redundancy and/or fail-over is also available.
1917

components/cache/cache_pools.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Pruning Cache Items
192192
-------------------
193193

194194
Some cache pools do not include an automated mechanism for pruning expired cache items.
195-
For example, the :ref:`FilesystemAdapter <component-cache-filesystem-adapter>` cache
195+
For example, the :doc:`FilesystemAdapter </components/cache/adapters/filesystem_adapter>` cache
196196
does not remove expired cache items *until an item is explicitly requested and determined to
197197
be expired*, for example, via a call to ``Psr\Cache\CacheItemPoolInterface::getItem``.
198198
Under certain workloads, this can cause stale cache entries to persist well past their
@@ -202,11 +202,11 @@ expired cache items.
202202
This shortcoming has been solved through the introduction of
203203
:class:`Symfony\\Component\\Cache\\PruneableInterface`, which defines the abstract method
204204
:method:`Symfony\\Component\\Cache\\PruneableInterface::prune`. The
205-
:ref:`ChainAdapter <component-cache-chain-adapter>`,
206-
:ref:`DoctrineDbalAdapter <doctrine-dbal-adapter>`, and
207-
:ref:`FilesystemAdapter <component-cache-filesystem-adapter>`,
208-
:ref:`PdoAdapter <pdo-adapter>`, and
209-
:ref:`PhpFilesAdapter <component-cache-files-adapter>` all implement this new interface,
205+
:doc:`ChainAdapter </components/cache/adapters/chain_adapter>`,
206+
:doc:`DoctrineDbalAdapter </components/cache/adapters/doctrine_dbal_adapter>`, and
207+
:doc:`FilesystemAdapter </components/cache/adapters/filesystem_adapter>`,
208+
:doc:`PdoAdapter </components/cache/adapters/pdo_adapter>`, and
209+
:doc:`PhpFilesAdapter </components/cache/adapters/php_files_adapter>` all implement this new interface,
210210
allowing manual removal of stale cache items::
211211

212212
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
@@ -215,7 +215,7 @@ allowing manual removal of stale cache items::
215215
// ... do some set and get operations
216216
$cache->prune();
217217

218-
The :ref:`ChainAdapter <component-cache-chain-adapter>` implementation does not directly
218+
The :doc:`ChainAdapter </components/cache/adapters/chain_adapter>` implementation does not directly
219219
contain any pruning logic itself. Instead, when calling the chain adapter's
220220
:method:`Symfony\\Component\\Cache\\Adapter\\ChainAdapter::prune` method, the call is delegated to all
221221
its compatible cache adapters (and those that do not implement ``PruneableInterface`` are

0 commit comments

Comments
 (0)