-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Cache] Memcached Adapter Docs and Cache Pool Docs Refactoring #7265
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
[Cache] Memcached Adapter Docs and Cache Pool Docs Refactoring #7265
Conversation
Test failure unrelated to this PR: https://travis-ci.org/symfony/symfony-docs/builds/184129616#L215 |
303091c
to
5a38c70
Compare
Assuming symfony/symfony#20863 is merged as-is, documentation is up-to-date. Refactored the adapter pool docs to move them into separate files (they haven't otherwise been edited aside from a link to DSN in the Redis adapter and correcting the spacing in the |
5a38c70
to
56cc20d
Compare
a0eae02
to
703aa32
Compare
Great work! Instead of listing the options, I wonder if we shouldn't link to the php doc. If we could expand to the same level the redis section, it could be great to have them on parity. |
Regarding Redis: I'll give that a look and update it in-line with Memcached adapter; sure. As for the Memcached options, I'm split on this. The original copy didn't have options, and later they were added for a few reasons. First, the PHP manual includes invalid options, like Which is what led to the inclusion of options in the Symfony docs. @nicolas-grekas Given the above, do you still think we should just link to the PHP manual? It should be noted that I still do link to the manual as the last line of the documentation. |
Reasonable :) let's see what the docs core team thinks about it, maybe there is some existing practice on the topic. |
Good catch (re version requirement). Will add. |
… to MemcachedAdapter (nicolas-grekas, robfrawley) This PR was merged into the 3.3-dev branch. Discussion ---------- [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | symfony/symfony-docs#7265 Replaces #20863 ping @robfrawley: would you mind opening a doc PR for this? Commits ------- 87030b4 [cache] Add tests for MemcachedAdapter::createClient() e109438 [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter
… to MemcachedAdapter (nicolas-grekas, robfrawley) This PR was merged into the 3.3-dev branch. Discussion ---------- [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | symfony/symfony-docs#7265 Replaces #20863 ping @robfrawley: would you mind opening a doc PR for this? Commits ------- 87030b4 [cache] Add tests for MemcachedAdapter::createClient() e109438 [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter
… to MemcachedAdapter (nicolas-grekas, robfrawley) This PR was merged into the 3.3-dev branch. Discussion ---------- [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | symfony/symfony-docs#7265 Replaces #20863 ping @robfrawley: would you mind opening a doc PR for this? Commits ------- 87030b4 [cache] Add tests for MemcachedAdapter::createClient() e109438 [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter
optional username and password (for SASL authentication; it requires that the | ||
memcached extension was compiled with ``--enable-memcached-sasl``) and an | ||
optional weight (for prioritizing servers in a cluster; its value is an integer | ||
between ``0`` and ``100`` which defaults to ``XX``; a higher value means more |
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.
Here we're missing the default value of weight
: 0? 50?
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.
So, there isn't really a "default" for this value. If a weight isn't set, all servers are treated exactly the same. We don't provide any default weight when one isn't specified. How do you think we should make that clear and word it?
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.
@robfrawley thanks for contributing this massive PR. I've reviewed it carefully and I'm 👍
In 68dc310 I've made some minor simplifications and I've sorted the options alphabetically and updated its syntax to use the reStructuredText definition lists (that's why the changes look bigger than they really are).
@javiereguiluz Thanks for taking a look and reviewing this PR; I won't have time to update this PR until the coming weekend. You can expect me to address any comments you made, as well as expand the Redis section. I'll be sure to submit something before the end of the weekend, and then this should likely be merged ASAP, as all related PRs have been finalized and submitted into the Symfony codebase already. I'll let you and @nicolas-grekas know when this needs a final review. Thanks! |
@nicolas-grekas Finished the section pertaining to Redis connection options (see the platform.sh build). Feel free to advise me if you require additional changes. @javiereguiluz Did some rebasing to clean this up a bit; let me know if I should squash or otherwise edit the commit history prior to the PR's merger. This should be ready! |
Doc what the default "persistent_id" is when only persistent is set? (I don't remember myself) |
@nicolas-grekas Didn't look like that was the case when I gave it a once-over Please correct me if I am wrong and should add something about |
Erm, nevermind, misread your comment. The default is That said, the behavior looks different for |
0a8ee1f
to
0213bc0
Compare
Is this good to go, or do I need to do anything prior to merge? |
@robfrawley Can you resolve conflicts here? |
357b2dc
to
c49d427
Compare
@xabbuh rebased |
This adapter is a high-performance, shared memory cache. It can increase the | ||
application performance very significantly because the cache contents are | ||
stored in the shared memory of your server, a component that is much faster than | ||
others, such as the file system. |
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.
filesystem
|
||
.. tip:: | ||
|
||
Note that this adapters CRUD operations are specific to the PHP SAPI it is running |
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.
adapter's
|
||
.. note:: | ||
|
||
When an item is not found in the first adapters but is found in the next ones, 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.
[...] first adapter [...]
adapter ensures that the fetched item is saved in all the adapters where it was | ||
previously missing. | ||
|
||
The following shows how to create a chain adapter instance using the fastest and slowest |
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.
The following example [...]
@xabbuh fixes pushed |
👍 Status: Reviewed |
@javiereguiluz @xabbuh Anything else you guys want me to do for this PR? This should likely be merged sooner than later, as (aside from the general cleanup and expansion of adapter docs) it provides the initial documentation for the Memcached feature, which has been live on Additionally, as this PR reorganizes and moves all the adapter docs into their own pages, it will continue to have merge conflicts when anyone so much as touches the adapter docs, and I'd appreciate not having to rebase this PR over and over. ;-) All the best. |
👍 Let's merge this. @javiereguiluz Anything else from your side? |
@xabbuh nothing else from me ... just thanking @robfrawley again for his amazing work here! |
Thanks for the reviews as well, guys. Symfony is absolutely the best community to be involved in, and you guys do an amazing job maintaining the respective aspects of the project you contribute to @nicolas-grekas, @javiereguiluz, and @xabbuh! |
Thank you @robfrawley. |
…ctoring (robfrawley, javiereguiluz) This PR was merged into the master branch. Discussion ---------- [Cache] Memcached Adapter Docs and Cache Pool Docs Refactoring Documentation for symfony/symfony#20863 and symfony/symfony#20858. PR symfony/symfony#20863 is still being written/finalized, so this is a WIP following that PR at this time. Resolves #7256. Commits ------- 7db929c corrected spelling/grammar c49d427 cleanup all cache adapter documentation, extend redis docs e3eff5b Reviewed the entire article d4292b7 refactor cache pool documentation and add memcached adapter docs
Documentation for symfony/symfony#20863 and symfony/symfony#20858. PR symfony/symfony#20863 is still being written/finalized, so this is a WIP following that PR at this time. Resolves #7256.