Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7f8e215

Browse files
feature #25892 Adding an array adapter (weaverryan)
This PR was merged into the 4.1-dev branch. Discussion ---------- Adding an array adapter | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | symfony/symfony-docs#9110 There's no simple way to *disable* caching (e.g. in the dev) environment. Setting up an array adapter is a very simple way to allow this :). Commits ------- f92e03d adding an array adapter
2 parents f74bda5 + f92e03d commit 7f8e215

File tree

1 file changed

+9
-0
lines changed
  • src/Symfony/Bundle/FrameworkBundle/Resources/config

1 file changed

+9
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/cache.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,15 @@
104104
</call>
105105
</service>
106106

107+
<service id="cache.adapter.array" class="Symfony\Component\Cache\Adapter\ArrayAdapter" abstract="true">
108+
<tag name="cache.pool" clearer="cache.default_clearer" />
109+
<tag name="monolog.logger" channel="cache" />
110+
<argument>0</argument> <!-- default lifetime -->
111+
<call method="setLogger">
112+
<argument type="service" id="logger" on-invalid="ignore" />
113+
</call>
114+
</service>
115+
107116
<service id="cache.default_clearer" class="Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer">
108117
<argument type="collection" />
109118
</service>

0 commit comments

Comments
 (0)