8000 [Cache] Document "framework.cache" node · symfony/symfony-docs@206ccc7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 206ccc7

Browse files
[Cache] Document "framework.cache" node
1 parent 3b2a45c commit 206ccc7

File tree

1 file changed

+147
-1
lines changed

1 file changed

+147
-1
lines changed

reference/configuration/framework.rst

Lines changed: 147 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Configuration
5555
* `session`_
5656
* `storage_id`_
5757
* `handler_id`_
58-
* `name`_
58+
* :ref:`name <session-name>`
5959
* `cookie_lifetime`_
6060
* `cookie_path`_
6161
* `cookie_domain`_
@@ -102,6 +102,20 @@ Configuration
102102
* :ref:`cache <reference-serializer-cache>`
103103
* :ref:`enable_annotations <reference-serializer-enable_annotations>`
104104
* :ref:`name_converter <reference-serializer-name_converter>`
105+
* :ref:`cache <reference-cache>`
106+
* :ref:`app <reference-cache-app>`
107+
* `system`_
108+
* `directory`_
109+
* `default_doctrine_provider`_
110+
* `default_psr6_provider`_
111+
* `default_redis_provider`_
112+
* `pools`_
113+
* :ref:`name <reference-cache-pools-name>`
114+
* `adapter`_
115+
* `public`_
116+
* `default_lifetime`_
117+
* `provider`_
118+
* `clearer`_
105119

106120
secret
107121
~~~~~~
@@ -674,6 +688,8 @@ installation.
674688
You can see an example of the usage of this in
675689
:doc:`/doctrine/pdo_session_storage`.
676690

691+
.. _session-name:
692+
677693
name
678694
....
679695

@@ -1446,6 +1462,119 @@ value.
14461462
For more information, see
14471463
:ref:`component-serializer-converting-property-names-when-serializing-and-deserializing`.
14481464

1465+
.. _reference-cache:
1466+
1467+
cache
1468+
~~~~~
1469+
1470+
.. _reference-cache-app:
1471+
1472+
app
1473+
...
1474+
1475+
**type**: ``string`` **default**: ``cache.adapter.filesystem``
1476+
1477+
The cache adapter behind the ``cache.app`` service.
1478+
1479+
.. note::
1480+
1481+
The framework bundle ships with multiple adapters : apcu, doctrine, system, filesystem, psr6, redis.
1482+
1483+
system
1484+
......
1485+
1486+
**type**: ``string`` **default**: ``cache.adapter.system``
1487+
1488+
The cache adapter behind the ``cache.system`` service.
1489+
1490+
directory
1491+
.........
1492+
1493+
**type**: ``string`` **default**: ``%kernel.cache_dir%/pools``
1494+
1495+
The path to the cache directory used by services inheriting from the ``cache.adapter.filesystem`` adapter
1496+
(including ``cache.app``).
1497+
1498+
default_doctrine_provider
1499+
.........................
1500+
1501+
**type**: ``string``
1502+
1503+
The service name to use as your default doctrine provider.
1504+
1505+
default_psr6_provider
1506+
.....................
1507+
1508+
**type**: ``string`` **default**: ``%kernel.cache_dir%/pools``
1509+
1510+
The service name to use as your default psr6 provider.
1511+
1512+
default_redis_provider
1513+
......................
1514+
1515+
**type**: ``string`` **default**: ``redis://localhost``
1516+
1517+
The dsn to use by the redis provider.
1518+
1519+
pools
1520+
.....
1521+
1522+
**type**: ``array``
1523+
1524+
A list of cache pools to be created by the framework extension.
1525+
1526+
.. _reference-cache-pools-name:
1527+
1528+
name
1529+
""""
1530+
1531+
**type**: ``prototype``
1532+
1533+
Name of the pool you want to create.
1534+
1535+
.. note::
1536+
1537+
Your pool name must differ from ``cache.app`` or ``cache.system``.
1538+
1539+
adapter
1540+
#######
1541+
1542+
**type**: ``string`` **default**: ``cache.app``
1543+
1544+
A cache adapter.
1545+
1546+
public
1547+
######
1548+
1549+
**type**: ``boolean`` **default**: ``false``
1550+
1551+
Whether your service should be public or not.
1552+
1553+
default_lifetime
1554+
################
1555+
1556+
**type**: ``integer``
1557+
1558+
Default lifetime of your cache items.
1559+
1560+
provider
1561+
########
1562+
1563+
**type**: ``string``
1564+
1565+
The service name to use as provider when the specified adapter needs one.
1566+
1567+
clearer
1568+
#######
1569+
1570+
**type**: ``string``
1571+
1572+
The cache clearer used to clear your PSR-6 cache.
1573+
1574+
.. seealso::
1575+
1576+
For more information, see :class:`Symfony\\Component\\HttpKernel\\CacheClearer\\Psr6CacheClearer`
1577+
14491578
Full Default Configuration
14501579
--------------------------
14511580

@@ -1580,6 +1709,23 @@ Full Default Configuration
15801709
file_cache_dir: '%kernel.cache_dir%/annotations'
15811710
debug: '%kernel.debug%'
15821711
1712+
# cache configuration
1713+
cache:
1714+
app: cache.app
1715+
system: cache.system
1716+
directory: '%kernel.cache_dir%/pools'
1717+
default_doctrine_provider: ~
1718+
default_psr6_provider: ~
1719+
default_redis_provider: 'redis://localhost'
1720+
pools:
1721+
# Prototype
1722+
name:
1723+
adapter: cache.app
1724+
public: false
1725+
default_lifetime: ~
1726+
provider: ~
1727+
clearer: ~
1728+
15831729
.. _`HTTP Host header attacks`: http://www.skeletonscribe.net/2013/05/practical-http-host-header-attacks.html
15841730
.. _`Security Advisory Blog post`: https://symfony.com/blog/security-releases-symfony-2-0-24-2-1-12-2-2-5-and-2-3-3-released#cve-2013-4752-request-gethost-poisoning
15851731
.. _`Doctrine Cache`: http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/caching.html

0 commit comments

Comments
 (0)
0