Last active
February 15, 2017 14:32
-
-
Save adri/0b065067905cdb7e3fb1181496a80841 to your computer and use it in GitHub Desktop.
Cache Doctrine metadata via opcache using DoctrineCacheBridge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
framework: | |
cache: | |
pools: | |
app.cache.doctrine_metadata: | |
adapter: cache.adapter.php_files | |
doctrine: | |
orm: | |
entity_managers: | |
default: | |
metadata_cache_driver: | |
type: service | |
id: app.cache.metadata_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<service id="app.cache.metadata_cache" class="Cache\Bridge\DoctrineCacheBridge"> | |
<argument type="service" id="app.cache.doctrine_metadata" /> | |
</service> | |
<service id="cache.adapter.php_files" class="Symfony\Component\Cache\Adapter\PhpFilesAdapter" abstract="true"> | |
<tag name="cache.pool" clearer="cache.default_clearer" /> | |
<tag name="monolog.logger" channel="cache" /> | |
<argument /> <!-- namespace --> | |
<argument>0</argument> <!-- default lifetime --> | |
<argument>%kernel.cache_dir%/pools</argument> | |
<call method="setLogger"> | |
<argument type="service" id="logger" on-invalid="ignore" /> | |
</call> | |
</service> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment