Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@robfrawley
Copy link
Contributor

Documentation forsymfony/symfony#20863 andsymfony/symfony#20858. PRsymfony/symfony#20863 is still being written/finalized, so this is a WIP following that PR at this time.Resolves#7256.

@robfrawley
Copy link
ContributorAuthor

Test failure unrelated to this PR:https://travis-ci.org/symfony/symfony-docs/builds/184129616#L215

@robfrawleyrobfrawleyforce-pushed thefeature-advanced-memcached-cache-pool branch from303091c to5a38c70CompareDecember 17, 2016 19:12
@robfrawleyrobfrawley changed the title[Cache] [WIP] Advanced Memcached Adapter Docs[Cache] Advanced Memcached Adapter DocsDec 17, 2016
@robfrawley
Copy link
ContributorAuthor

robfrawley commentedDec 17, 2016
edited
Loading

Assumingsymfony/symfony#20863 is merged as-is, documentation is up-to-date. Refactored the adapter pool docs to move theminto separate files (they haven't otherwise been edited aside from a link to DSN in the Redis adapter and correcting the spacing in theindex definition of the cache files), as the document became very, very long with thedetailed Memcached adapter docs added.

@robfrawleyrobfrawleyforce-pushed thefeature-advanced-memcached-cache-pool branch from5a38c70 to56cc20dCompareDecember 17, 2016 19:56
@robfrawleyrobfrawley changed the title[Cache] Advanced Memcached Adapter Docs[Cache] Advanced Memcached Adapter Docs and Cache Pool Docs RefactoringDec 17, 2016
@robfrawleyrobfrawley changed the title[Cache] Advanced Memcached Adapter Docs and Cache Pool Docs Refactoring[Cache] Memcached Adapter Docs and Cache Pool Docs RefactoringDec 17, 2016
@xabbuhxabbuh added this to the3.3 milestoneDec 30, 2016
@robfrawleyrobfrawleyforce-pushed thefeature-advanced-memcached-cache-pool branch 3 times, most recently froma0eae02 to703aa32CompareDecember 31, 2016 17:43
@nicolas-grekas
Copy link
Member

nicolas-grekas commentedDec 31, 2016
edited
Loading

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.

@robfrawley
Copy link
ContributorAuthor

robfrawley commentedDec 31, 2016
edited
Loading

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, likecache_lookups (and more), which will cause a deprecation exception to be thrown by the extension. Second, the PHP manual is missing options, likerandomize_replica_read (and more). Third, the PHP manual doesn't do a great job of making it obvious what are option names and what are option values. Lastly, I tried to provide better descriptions, especially where a description was completely absent, but also where it was simply ambiguous or badly written.

Which is what led to the inclusion of options in the Symfony docs.

@nicolas-grekas Given the above, do youstill think we shouldjust link to the PHP manual? It should be noted that Istill do link to the manual as the last line of the documentation.

@nicolas-grekas
Copy link
Member

Reasonable :) let's see what the docs core team thinks about it, maybe there is some existing practice on the topic.
I may have missed it, but we should tell that v2.2 or higher is required btw!

@robfrawley
Copy link
ContributorAuthor

Good catch (re version requirement). Will add.

symfony-splitter pushed a commit to symfony/cache that referenced this pull requestJan 4, 2017
… 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#7265Replaces #20863ping@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
nicolas-grekas added a commit to symfony/symfony that referenced this pull requestJan 4, 2017
… 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#7265Replaces#20863ping@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
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull requestJan 4, 2017
… 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#7265Replaces #20863ping@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

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 ofweight: 0? 50?

Copy link
ContributorAuthor

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?

Copy link
Member

@javiereguiluzjaviereguiluz left a 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 👍

In68dc310 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).

@robfrawley
Copy link
ContributorAuthor

robfrawley commentedJan 13, 2017
edited
Loading

@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!

@robfrawley
Copy link
ContributorAuthor

@nicolas-grekas Finished the section pertaining to Redis connection options (seethe 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!

@nicolas-grekas
Copy link
Member

Doc what the default "persistent_id" is when only persistent is set? (I don't remember myself)

@robfrawley
Copy link
ContributorAuthor

robfrawley commentedJan 24, 2017
edited
Loading

@nicolas-grekas Didn't look like that was the case when I gave it a once-over

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Cache/Traits/RedisTrait.php#L105

Please correct me if I am wrong and should add something aboutpersistend_id only applying whenpersistent is enabled, but it doesn't look like that is the case to me.

@robfrawley
Copy link
ContributorAuthor

Erm, nevermind, misread your comment. The defaultisnull.

That said, the behavior looks different for\Redis and\Predis\Client: with\Redis it will enable persistent connections if eitherpersistent orpersistent_id is set, but withPredis\Client it just blindly passes the parameters. Does that client behave similarly?

@robfrawleyrobfrawleyforce-pushed thefeature-advanced-memcached-cache-pool branch from0a8ee1f to0213bc0CompareJanuary 25, 2017 15:19
@robfrawley
Copy link
ContributorAuthor

Is this good to go, or do I need to do anything prior to merge?

@xabbuh
Copy link
Member

@robfrawley Can you resolve conflicts here?

@robfrawleyrobfrawleyforce-pushed thefeature-advanced-memcached-cache-pool branch 2 times, most recently from357b2dc toc49d427CompareFebruary 8, 2017 15:44
@robfrawley
Copy link
ContributorAuthor

@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.
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The following example [...]

@robfrawley
Copy link
ContributorAuthor

@xabbuh fixes pushed

@xabbuh
Copy link
Member

👍

Status: Reviewed

@robfrawley
Copy link
ContributorAuthor

robfrawley commentedFeb 16, 2017
edited
Loading

@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 onmaster for over a month.

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 astouches the adapter docs, and I'd appreciate not having to rebase this PR over and over. ;-)

All the best.

@xabbuh
Copy link
Member

👍 Let's merge this.

@javiereguiluz Anything else from your side?

robfrawley reacted with hooray emoji

@javiereguiluz
Copy link
Member

@xabbuh nothing else from me ... just thanking@robfrawley again for his amazing work here!

robfrawley reacted with heart emoji

@robfrawley
Copy link
ContributorAuthor

robfrawley commentedFeb 26, 2017
edited
Loading

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!

@xabbuh
Copy link
Member

Thank you@robfrawley.

@xabbuhxabbuh merged commit7db929c intosymfony:masterMar 13, 2017
xabbuh added a commit that referenced this pull requestMar 13, 2017
…ctoring (robfrawley, javiereguiluz)This PR was merged into the master branch.Discussion----------[Cache] Memcached Adapter Docs and Cache Pool Docs RefactoringDocumentation forsymfony/symfony#20863 andsymfony/symfony#20858. PRsymfony/symfony#20863 is still being written/finalized, so this is a WIP following that PR at this time.Resolves#7256.Commits-------7db929c corrected spelling/grammarc49d427 cleanup all cache adapter documentation, extend redis docse3eff5b Reviewed the entire articled4292b7 refactor cache pool documentation and add memcached adapter docs
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@xabbuhxabbuhxabbuh left review comments

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

5 participants

@robfrawley@nicolas-grekas@javiereguiluz@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp