Skip to content
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

Remove set instead of removing set members if only one tag #162

Open
joshua-bn opened this issue Sep 27, 2020 · 1 comment
Open

Remove set instead of removing set members if only one tag #162

joshua-bn opened this issue Sep 27, 2020 · 1 comment

Comments

@joshua-bn
Copy link

// Remove ids from list of all ids

If we only have one cache tag (I think that's the usual case, at least for Magento), we can just remove this instead of removing the set members, right?

@colinmollenhour
Copy link
Owner

The _notMatchingTags flag is disabled by default so this code would not have any effect unless it is enabled by the user. When enabled it keeps track of all ids in a separate set so that it is efficient to do a "not matching tags" cache clear. Otherwise it would be very time consuming to get all ids. This is a lot of overhead though which is why it's disabled by default.

I've seen plenty of cases where there are multiple tags used so I don't think any such assumptions can be made safely, at least not for a general-purpose library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants