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] Fix redis adapter config to work with tags#19996

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
xabbuh merged 1 commit intosymfony:5.4fromHuluti:patch-1
Aug 6, 2024
Merged

[Cache] Fix redis adapter config to work with tags#19996

xabbuh merged 1 commit intosymfony:5.4fromHuluti:patch-1
Aug 6, 2024

Conversation

@Huluti
Copy link
Contributor

@HulutiHuluti commentedJun 26, 2024
edited
Loading

I found that to work with redis and tags using this config was not working (tag not set and invalidation not working):

 'adapter' => 'cache.adapter.redis', 'tags' => true,

While with this one all was working fine:

adapter' => 'cache.adapter.redis_tag_aware',

Up to you if you think that it makes sense :)

Copy link
Member

@xabbuhxabbuh left a comment

Choose a reason for hiding this comment

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

looks good to me

@xabbuh
Copy link
Member

@nicolas-grekas This applies to 5.4 too, right?

javiereguiluz reacted with thumbs up emoji

@javiereguiluz
Copy link
Member

@xabbuh you are right. This is available since 5.2:symfony/symfony#36596

@javiereguiluzjaviereguiluz added this to the5.4 milestoneAug 5, 2024
@carsonbotcarsonbot changed the titleFix redis adapter config to work with tags[Cache] Fix redis adapter config to work with tagsAug 5, 2024
@xabbuhxabbuh changed the base branch from7.1 to5.4August 6, 2024 08:15
@xabbuh
Copy link
Member

Thank you@Huluti.

Huluti reacted with heart emoji

@xabbuhxabbuh merged commit8fe145a intosymfony:5.4Aug 6, 2024
@HulutiHuluti deleted the patch-1 branchAugust 6, 2024 08:16
@nicolas-grekas
Copy link
Member

nicolas-grekas commentedAug 12, 2024
edited
Loading

I'm sorry but this change looks wrong to me. I just created a small app and the previous snippet works well.
tags: true works with all adapters, whilecache.adapter.redis_tag_aware is specific to redis.
(note that for redis, those two configs lead to different cache storage strategies, see docblock on top of each implementation if the doc isn't clear on this aspect)

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedAug 12, 2024
edited
Loading

@Huluti did you useTagAwareCacheInterface orCacheInterface when experiencing the issue? Only the former works.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhxabbuh approved these changes

@nicolas-grekasnicolas-grekasAwaiting requested review from nicolas-grekas

@OskarStarkOskarStarkAwaiting requested review from OskarStark

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

5 participants

@Huluti@xabbuh@javiereguiluz@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp