Skip to content

Commit

Permalink
Update caching documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alcaeus committed Apr 6, 2019
1 parent 13bf538 commit 92dfa1f
Showing 1 changed file with 40 additions and 18 deletions.
58 changes: 40 additions & 18 deletions Resources/doc/configuration.rst
Expand Up @@ -273,29 +273,32 @@ Configuration Reference
some_em:
query_cache_driver:
type: array
id: ~
pool: ~
host: ~
port: ~
instance_class: ~
class: ~
id: ~
namespace: ~
cache_provider: ~
metadata_cache_driver:
type: array
id: ~
pool: ~
host: ~
port: ~
instance_class: ~
class: ~
id: ~
namespace: ~
cache_provider: ~
result_cache_driver:
type: array
id: ~
pool: ~
host: ~
port: ~
instance_class: ~
class: ~
id: ~
namespace: ~
cache_provider: ~
entity_listeners:
Expand Down Expand Up @@ -323,11 +326,12 @@ Configuration Reference
second_level_cache:
region_cache_driver:
type: array
pool: ~
id: ~
host: ~
port: ~
instance_class: ~
class: ~
id: ~
namespace: ~
cache_provider: ~
region_lock_lifetime: 60
Expand All @@ -341,11 +345,12 @@ Configuration Reference
name:
cache_driver:
type: array
id: ~
pool: ~
host: ~
port: ~
instance_class: ~
class: ~
id: ~
namespace: ~
cache_provider: ~
lock_path: '%kernel.cache_dir%/doctrine/orm/slc/filelock'
Expand Down Expand Up @@ -621,33 +626,36 @@ Configuration Reference
<doctrine:query-cache-driver
type="array"
id=""
pool=""
host=""
port=""
instance-class=""
class=""
id=""
namespace="null"
cache-provider="null"
/>
<doctrine:metadata-cache-driver
type="memcache"
id=""
pool=""
host="localhost"
port="11211"
instance-class="Memcache"
class="Doctrine\Common\Cache\MemcacheCache"
id=""
namespace="null"
cache-provider="null"
/>
<doctrine:result-cache-driver
type="array"
id=""
pool=""
host=""
port=""
instance-class=""
class=""
id=""
namespace="null"
cache-provider="null"
/>
Expand Down Expand Up @@ -682,11 +690,12 @@ Configuration Reference
<doctrine:region-cache-driver
type="array"
id=""
pool=""
host=""
port=""
instance-class=""
class=""
id=""
namespace="null"
cache-provider="null"
/>
Expand All @@ -703,11 +712,12 @@ Configuration Reference
<doctrine:cache-driver
type="array"
id=""
pool=""
host=""
port=""
instance-class=""
class=""
id=""
namespace="null"
cache-provider="null"
/>
Expand Down Expand Up @@ -825,8 +835,11 @@ The environment variables that doctrine is going to change in the Oracle DB sess
Caching Drivers
~~~~~~~~~~~~~~~

For the caching drivers you can specify the values ``array``, ``apc``, ``apcu``, ``memcache``,
``memcached`` or ``xcache``.
For the caching drivers you can specify the values ``array``, ``apc``, ``apcu``,
``memcache``, ``memcached``, ``redis``, ``wincache``, ``zenddata`` and
``xcache``. You can use a Symfony Cache pool by using the ``pool`` type and
creating a cache bool through the FrameworkBundle configuration. The ``service``
type lets you define the ``ID`` of your own caching service.

The following example shows an overview of the caching configurations:

Expand All @@ -835,13 +848,22 @@ The following example shows an overview of the caching configurations:
doctrine:
orm:
auto_mapping: true
metadata_cache_driver: apcu
query_cache_driver: xcache
# each caching driver type defines its own config options
metadata_cache_driver: apc
# the 'pool' type requires to define the 'pool' option and configure a cache pool using the FrameworkBundle
result_cache_driver:
type: memcache
host: localhost
port: 11211
instance_class: Memcache
type: pool
pool: doctrine.result_cache_pool
# the 'service' type requires to define the 'id' option too
query_cache_driver:
type: service
id: App\ORM\MyCacheService
framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
Mapping Configuration
~~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit 92dfa1f

Please sign in to comment.