Skip to content

Commit

Permalink
feature #25892 Adding an array adapter (weaverryan)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nicolas-grekas committed Jan 31, 2018
2 parents f74bda5 + f92e03d commit 7f8e215
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Symfony/Bundle/FrameworkBundle/Resources/config/cache.xml
Expand Up @@ -104,6 +104,15 @@
</call>
</service>

<service id="cache.adapter.array" class="Symfony\Component\Cache\Adapter\ArrayAdapter" abstract="true">
<tag name="cache.pool" clearer="cache.default_clearer" />
<tag name="monolog.logger" channel="cache" />
<argument>0</argument> <!-- default lifetime -->
<call method="setLogger">
<argument type="service" id="logger" on-invalid="ignore" />
</call>
</service>

<service id="cache.default_clearer" class="Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer">
<argument type="collection" />
</service>
Expand Down

0 comments on commit 7f8e215

Please sign in to comment.