-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Cache] Show how to configure the cache #11329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Ping @wouterj, Im ready for a review. |
cache.rst
Outdated
component is shipped with many adapters to different storages. Every adapter is | ||
developed for high performance. | ||
|
||
Basic uses of the cache looks like this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use „::“ sth the end instead of the next code block directive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really great! Added some small comments, but this article will be a huge help for people wanting to use caching I think.
cache.rst
Outdated
|
||
.. code-block:: yaml | ||
|
||
framework: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please prefix a comment indicating the file name: # config/packages/cache.yaml
(not sure if this path is correct)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And in the final version of this PR, we also should add the XML and PHP examples (we can help you write them)
cache.rst
Outdated
- cache.adapter.psr6 | ||
- cache.adapter.system | ||
- NullAdapter | ||
- cache.adapter.array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We always use the *
sign for lists instead of the dash.
And maybe it's usefull to group this list? For instance, we have "decorator" adapters (like Chain and PSR6 IIRC), actual implementation (almost all others) and test adapters (Null & array)
Thank you for the review, I've updated the PR accordingly. |
c3fc724
to
f01db6d
Compare
The build failure seams unrelated. This could be merged in 3.4. But then we should probably remove the intro section about CacheInterface from Contracts. Tell me if I can do anything more to make sure this is merged. |
Failure is fixed here: #11348 |
No worries, this is one of the greatest additions of the weekend, so I'm going to merge it when I'm back home. I think for 3.4, we can change the example to PSR-6 and then use your contract example as of 4.2? |
* 4.2: [#11329] Readded the Symfony cache contracts example [Cache] Show how to configure the cache
Thanks a lot for your effort into creating this documentation! It has been missing for way too long. I've merged this into 3.4 and changed the example to be PSR-16 (because, tbh, PSR-6 felt too complex for a "hey look how great our component is" example). And then reintroduced the code example in this PR in e5c28d7 on the 4.2 branch. @javiereguiluz can you make sure https://symfony.com/doc/current/index.html gets updated with this new "Cache" main guide? |
Thank you for all the help with this PR.
… On 7 Apr 2019, at 21:51, Wouter J ***@***.***> wrote:
Thanks a lot for your effort into creating this documentation! It has been missing for way too long.
I've merged this into 3.4 and changed the example to be PSR-16 (because, tbh, PSR-6 felt too complex for a "hey look how great our component is" example). And then reintroduced the code example in this PR in e5c28d7 on the 4.2 branch.
@javiereguiluz can you make sure https://symfony.com/doc/current/index.html gets updated with this new "Cache" main guide?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Configuring Cache with FrameworkBundle | ||
-------------------------------------- | ||
|
||
When configuring the the cache component there are a few concepts you should know |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double "the"
------------------ | ||
|
||
To clear the cache you can use the ``bin/console cache:pool:clear [pool]`` command. | ||
That will remove all the entries from your storage and you wil have to recalcuate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: recalculate
To clear the cache you can use the ``bin/console cache:pool:clear [pool]`` command. | ||
That will remove all the entries from your storage and you wil have to recalcuate | ||
all values. You can also group your pools into "cache clearers". There are 3 cache | ||
clearer by default: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clearers (missing s)
I found some typos :) |
Thank you for the review. Your comments are addressed here: #11351 |
This will fix #10989, fix #8711 and resolve many of my previous headaches.
I want to have a page that explain how you configure the cache with the framework bundle. I added a first draft, some things are just notes to myself.
This is clearly a work in progress, I will continue on this tomorrow.
#eu-fossa