-
Notifications
You must be signed in to change notification settings - Fork 351
Improved cache-invalidation for categories/tags in excerpt tab #3779
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
Improved cache-invalidation for categories/tags in excerpt tab #3779
Conversation
febe812
to
562210e
Compare
562210e
to
ccf04b0
Compare
@@ -3,3 +3,4 @@ framework: | |||
storage_id: session.storage.mock_file | |||
profiler: | |||
enabled: false | |||
|
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.
Superfluous newline
|
||
if (isset($excerpt['tags'])) { | ||
foreach ($this->tagManager->resolveTagNames($excerpt['tags']) as $tag) { | ||
$this->invalidationHandler->invalidateReference('tag', $tag); |
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.
Why do we need to invalidate the entire tag? Wouldn't it be enough to only invalidate pages which have the resulting pages/snippets/contacts whatever?
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 want to invalidate pages which uses the tag/category (for example as a filter for queries - smart-content in this case).
…cerpt tags/categories
ccf04b0
to
b8590e6
Compare
public function invalidateReference($alias, $id) | ||
{ | ||
foreach ($this->handlers as $handler) { | ||
if (!$handler instanceof HandlerInvalidateStructureInterface) { |
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.
Shouldn't that check be HandlerInvalidateReferenceInterface
?
@trickreich I think you should also do a rebase of your caching PR quite soon, so that you can ask @wachterjohannes for help, because I guess there will be some conflicts here. |
What's in this PR?
This PR uses reference-store of categories and tags to invalidate pages where a smart-content uses tags/categories in the query.
To Do