Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitff651b6

Browse files
committed
minor#10111 [Cache] tell about PDO configuration and table autocreation (nicolas-grekas)
This PR was merged into the master branch.Discussion----------[Cache] tell about PDO configuration and table autocreationDoc forsymfony/symfony#27694Commits-------187300a [Cache] tell about PDO configuration and table autocreation
2 parents96d3023 +187300a commitff651b6

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

‎components/cache/adapters/pdo_doctrine_dbal_adapter.rst‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ third, and forth parameters::
3131
$options = array()
3232
);
3333

34+
..versionadded::4.2
35+
Automatic table creation was introduced in Symfony 4.2.
36+
37+
The table where values are stored is created automatically on the first call to
38+
the:method:`Symfony\\Component\\Cache\\Adapter\\PdoAdapter::save` method.
39+
You can also create this table explicitly by calling the
40+
:method:`Symfony\\Component\\Cache\\Adapter\\PdoAdapter::createTable` method in
41+
your code.
42+
3443
..tip::
3544

3645
When passed a `Data Source Name (DSN)`_ string (instead of a database connection

‎reference/configuration/framework.rst‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Configuration
5050
*:ref:`app<reference-cache-app>`
5151
* `default_doctrine_provider`_
5252
* `default_memcached_provider`_
53+
* `default_pdo_provider`_
5354
* `default_psr6_provider`_
5455
* `default_redis_provider`_
5556
* `directory`_
@@ -1834,7 +1835,7 @@ app
18341835
The cache adapter used by the ``cache.app`` service. The FrameworkBundle
18351836
ships with multiple adapters: ``cache.adapter.apcu``, ``cache.adapter.doctrine``,
18361837
``cache.adapter.system``, ``cache.adapter.filesystem``, ``cache.adapter.psr6``,
1837-
``cache.adapter.redis``and ``cache.adapter.memcached``.
1838+
``cache.adapter.redis``, ``cache.adapter.memcached``and ``cache.adapter.pdo``.
18381839

18391840
There's also a special adapter called ``cache.adapter.array`` which stores
18401841
contents in memory using a PHP array and it's used to disable caching (mostly on
@@ -1900,6 +1901,14 @@ default_memcached_provider
19001901
The DSN to use by the Memcached provider. The provider is available as the ``cache.memcached``
19011902
service.
19021903

1904+
default_pdo_provider
1905+
..........................
1906+
1907+
**type**: ``string`` **default**: ``doctrine.dbal.default_connection``
1908+
1909+
The service id of the database connection, which should be either a PDO or a
1910+
Doctrine DBAL instance.
1911+
19031912
pools
19041913
.....
19051914

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp