Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Make AbstractTrait::getId and $namespace protected.#23960
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
stof commentedAug 23, 2017
Well, this method is not a supported extension point currently. I'm not sure we want to make it a supported inheritance extension point for people extending our cache implementations |
stof commentedAug 23, 2017
and anyway, doing it in 3.3 is a no-go. Adding new inheritance-based extension point is considered a new feature. |
nicolas-grekas commentedAug 23, 2017
I agree with@stof |
hcomnetworkers commentedAug 23, 2017
$namespace is also private and there is no setter. |
hcomnetworkers commentedAug 23, 2017
I can achieve the same result by extending all the protected methods and changing the id there, but since there is already getId-method that seems a bit bulky. |
nicolas-grekas commentedAug 23, 2017
So, you need instant clearing? Did you measure it as slow on your use case? By how much? |
hcomnetworkers commentedAug 23, 2017
I want to clear a namespaced memcached instance and I expect all other memcached instances not to be cleared afterwards. |
nicolas-grekas commentedAug 23, 2017
OK, got it. I suggest considering the issue as a bug, and implementing this strategy in the existing MemcachedTrait: when a non empty namespace is used, we do versioning. The extra round trip is the only way to solve the issue anyway. |
nicolas-grekas commentedAug 24, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thank you for raising the point@hcomnetworkers |
…pport clearing by keys (nicolas-grekas)This PR was merged into the 3.3 branch.Discussion----------[Cache] Use namespace versioning for backends that dont support clearing by keys| Q | A| ------------- | ---| Branch? | 3.3| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#23960| License | MIT| Doc PR | -Commits-------f8a7518 [Cache] Use namespace versioning for backends that dont support clearing by keys
Uh oh!
There was an error while loading.Please reload this page.
This PR allows to extend the getId-method of the caching classes.
Use case: Incrementing the namespace upon a clear()-call instead of flushing all cache instances with all namespaces (e.g. with Memcached).