File tree 1 file changed +23
-14
lines changed
Filter options
1 file changed +23
-14
lines changed
Original file line number Diff line number Diff line change @@ -222,26 +222,35 @@ Keep in mind that you can't use both syntaxes at the same time.
222
222
Caching Drivers
223
223
~~~~~~~~~~~~~~~
224
224
225
- The built-in types of caching drivers are: ``array ``, ``apc ``, ``apcu ``,
226
- ``memcache ``, ``memcached ``, ``redis ``, ``wincache ``, ``zenddata `` and ``xcache ``.
227
- There is a special type called ``service `` which lets you define the ID of your
228
- own caching service.
229
-
230
- The following example shows an overview of the caching configurations:
225
+ Use any of the existing :doc: `Symfony Cache </cache >` pools or define new pools
226
+ to cache each of Doctrine ORM elements (queries, results, etc.):
231
227
232
228
.. code-block :: yaml
233
229
230
+ # config/packages/prod/doctrine.yaml
231
+ framework :
232
+ cache :
233
+ pools :
234
+ doctrine.result_cache_pool :
235
+ adapter : cache.app
236
+ doctrine.system_cache_pool :
237
+ adapter : cache.system
238
+
234
239
doctrine :
235
240
orm :
236
- auto_mapping : true
237
- # each caching driver type defines its own config options
238
- metadata_cache_driver : apc
241
+ # ...
242
+ metadata_cache_driver :
243
+ type : pool
244
+ pool : doctrine.system_cache_pool
245
+ query_cache_driver :
246
+ type : pool
247
+ pool : doctrine.system_cache_pool
239
248
result_cache_driver :
240
- type : memcache
241
- host : localhost
242
- port : 11211
243
- instance_class : Memcache
244
- # the ' service' type requires to define the 'id' option too
249
+ type : pool
250
+ pool : doctrine.result_cache_pool
251
+
252
+ # in addition to Symfony Cache pools, you can also use the
253
+ # 'type: service' option to use any service as the cache
245
254
query_cache_driver :
246
255
type : service
247
256
id : App\ORM\MyCacheService
You can’t perform that action at this time.
0 commit comments