@@ -106,6 +106,19 @@ Configuration
106
106
* `log `_
107
107
* `throw `_
108
108
* :ref: `cache <reference-cache >`
109
+ * :ref: `app <reference-cache-app >`
110
+ * `system `_
111
+ * `directory `_
112
+ * `default_doctrine_provider `_
113
+ * `default_psr6_provider `_
114
+ * `default_redis_provider `_
115
+ * `pools `_
116
+ * :ref: `name <reference-cache-pools-name >`
117
+ * `adapter `_
118
+ * `public `_
119
+ * `default_lifetime `_
120
+ * `provider `_
121
+ * `clearer `_
109
122
* `prefix_seed `_
110
123
111
124
secret
@@ -696,6 +709,8 @@ installation.
696
709
You can see an example of the usage of this in
697
710
:doc: `/doctrine/pdo_session_storage `.
698
711
712
+ .. _name :
713
+
699
714
name
700
715
....
701
716
@@ -1567,6 +1582,129 @@ Throw PHP errors as ``\ErrorException`` instances. The parameter
1567
1582
cache
1568
1583
~~~~~
1569
1584
1585
+ .. _reference-cache-app :
1586
+
1587
+ app
1588
+ ...
1589
+
1590
+ **type **: ``string `` **default **: ``cache.adapter.filesystem ``
1591
+
1592
+ The cache adapter used by the ``cache.app `` service.
1593
+
1594
+ .. tip ::
1595
+
1596
+ It might be tough to understand at the beginning, so to avoid confusion remember that all pools perform the
1597
+ same actions but on different medium given the adapter they are based on. Internally, a pool wraps the definition
1598
+ of an adapter.
1599
+
1600
+ .. note ::
1601
+
1602
+ The framework bundle ships with multiple adapters: apcu, doctrine, system,
1603
+ filesystem, psr6, and redis.
1604
+
1605
+ system
1606
+ ......
1607
+
1608
+ **type **: ``string `` **default **: ``cache.adapter.system ``
1609
+
1610
+ The cache adapter used by the ``cache.system `` service.
1611
+
1612
+ directory
1613
+ .........
1614
+
1615
+ **type **: ``string `` **default **: ``%kernel.cache_dir%/pools ``
1616
+
1617
+ The path to the cache directory used by services inheriting from the
1618
+ ``cache.adapter.filesystem `` adapter (including ``cache.app ``).
1619
+
1620
+ default_doctrine_provider
1621
+ .........................
1622
+
1623
+ **type **: ``string ``
1624
+
1625
+ The service name to use as your default Doctrine provider.
1626
+
1627
+ default_psr6_provider
1628
+ .....................
1629
+
1630
+ **type **: ``string `` **default **: ``%kernel.cache_dir%/pools ``
1631
+
1632
+ The service name to use as your default PSR-6 provider.
1633
+
1634
+ default_redis_provider
1635
+ ......................
1636
+
1637
+ **type **: ``string `` **default **: ``redis://localhost ``
1638
+
1639
+ The dsn to use by the Redis provider.
1640
+
1641
+ pools
1642
+ .....
1643
+
1644
+ **type **: ``array ``
1645
+
1646
+ A list of cache pools to be created by the framework extension.
1647
+
1648
+ .. seealso ::
1649
+
1650
+ For more information about how pools works, see :ref: `cache pools <component-cache-cache-pools >`.
1651
+
1652
+ .. _reference-cache-pools-name :
1653
+
1654
+ name
1655
+ """"
1656
+
1657
+ **type **: ``prototype ``
1658
+
1659
+ Name of the pool you want to create.
1660
+
1661
+ .. note ::
1662
+
1663
+ Your pool name must differ from ``cache.app `` or ``cache.system ``.
1664
+
1665
+ adapter
1666
+ #######
1667
+
1668
+ **type **: ``string `` **default **: ``cache.app ``
1669
+
1670
+ The name of the adapter to use. You could also use your own implementation.
1671
+
1672
+ .. note ::
1673
+
1674
+ Your service MUST implement the :class: `Psr\\ Cache\\ CacheItemPoolInterface ` interface.
1675
+
1676
+ public
1677
+ ######
1678
+
1679
+ **type **: ``boolean `` **default **: ``false ``
1680
+
1681
+ Whether your service should be public or not.
1682
+
1683
+ default_lifetime
1684
+ ################
1685
+
1686
+ **type **: ``integer ``
1687
+
1688
+ Default lifetime of your cache items in seconds.
1689
+
1690
+ provider
1691
+ ########
1692
+
1693
+ **type **: ``string ``
1694
+
1695
+ The service name to use as provider when the specified adapter needs one.
1696
+
1697
+ clearer
1698
+ #######
1699
+
1700
+ **type **: ``string ``
1701
+
1702
+ The cache clearer used to clear your PSR-6 cache.
1703
+
1704
+ .. seealso ::
1705
+
1706
+ For more information, see :class: `Symfony\\ Component\\ HttpKernel\\ CacheClearer\\ Psr6CacheClearer `.
1707
+
1570
1708
prefix_seed
1571
1709
...........
1572
1710
@@ -1724,6 +1862,23 @@ Full Default Configuration
1724
1862
log : false
1725
1863
throw : ' %kernel.debug%'
1726
1864
1865
+ # cache configuration
1866
+ cache :
1867
+ app : cache.app
1868
+ system : cache.system
1869
+ directory : ' %kernel.cache_dir%/pools'
1870
+ default_doctrine_provider : ~
1871
+ default_psr6_provider : ~
1872
+ default_redis_provider : ' redis://localhost'
1873
+ pools :
1874
+ # Prototype
1875
+ name :
1876
+ adapter : cache.app
1877
+ public : false
1878
+ default_lifetime : ~
1879
+ provider : ~
1880
+ clearer : ~
1881
+
1727
1882
.. _`HTTP Host header attacks` : http://www.skeletonscribe.net/2013/05/practical-http-host-header-attacks.html
1728
1883
.. _`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
1729
1884
.. _`Doctrine Cache` : http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/caching.html
0 commit comments