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

Adding an array adapter#25892

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

@weaverryan
Copy link
Member

@weaverryanweaverryan commentedJan 22, 2018
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsnone
LicenseMIT
Doc PRsymfony/symfony-docs#9110

There's no simple way todisable caching (e.g. in the dev) environment. Setting up an array adapter is a very simple way to allow this :).

<tagname="cache.pool"clearer="cache.default_clearer" />
<tagname="monolog.logger"channel="cache" />
<argument>0</argument><!-- default lifetime-->
<callmethod="setLogger">
Copy link
Member

@xabbuhxabbuhJan 23, 2018
edited
Loading

Choose a reason for hiding this comment

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

There is nosetLogger() method inArrayAdapter, is there?

never mind, it is,ArrayAdapter usesArrayTrait which in turn usesLoggerAwareTrait

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedJan 24, 2018
edited
Loading

did you test it?
AFAIK, adding thecache.pool tag requires a special order and list of arguments on the constructor, which is not the case here (esp $namespace first), isn't it?

@weaverryan
Copy link
MemberAuthor

Yes, tested in a real project! And you're right about the ArrayAdapter argument thing, but it was already taken into account:

}elseif ('namespace' !==$attr || ArrayAdapter::class !==$adapter->getClass()) {

nicolas-grekas reacted with thumbs up emoji

@mickaelandrieu
Copy link
Contributor

There's no simple way to disable caching (e.g. in the dev) environment.

Why not usingNullAdapter instead? using ArrayAdapter will cache the values, even if it's only for a request, isn't it?

@nicolas-grekas
Copy link
Member

Thank you@weaverryan.

@nicolas-grekasnicolas-grekas merged commitf92e03d intosymfony:masterJan 31, 2018
nicolas-grekas added a commit that referenced this pull requestJan 31, 2018
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#9110There'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
@weaverryanweaverryan deleted the add_array_adapter branchFebruary 1, 2018 01:48
@fabpotfabpot mentioned this pull requestMay 7, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@dunglasdunglasdunglas approved these changes

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

@xabbuhxabbuhxabbuh approved these changes

+1 more reviewer

@SimperfitSimperfitSimperfit approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.1

Development

Successfully merging this pull request may close these issues.

8 participants

@weaverryan@nicolas-grekas@mickaelandrieu@dunglas@javiereguiluz@xabbuh@Simperfit@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp