Open
Conversation
Suppose you have a Drupal plugin that uses PSR-Cache and is configured to use, say, APC.
Then you add, say, a Symfony app that also uses APC.
There are bound to be key collisions here.
I would propose a "prefix" property and a composeKey ($key) { return $this->prefix . $key; }
This would allow each app to have their own configurable prefix providing a namespace.
It still doesn't guarantee two children won't use the same prefix . $key, but at least it gives the developers a sensible way out of the dilemma.
Frameworks could have standards to reduce the probability of collision. Ex, Drupal could standardize on 'Drupal_Modulename_site' as the default.
The 'site' part covers multisite.
Owner
|
You can't have "private" or "protected" fields inside of an interface, it'll throw an error. This type of detail is very, very important, but it falls more onto the implementing library to handle. We talked a bit about adding a "namespace" field into this version of the interface but it was rejected as too complicated by the group. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Suppose you have a Drupal plugin that uses PSR-Cache and is configured to use, say, APC.
Then you add, say, a Symfony app that also uses APC.
There are bound to be key collisions here.
I would propose a "prefix" property and a composeKey ($key) { return $this->prefix . $key; }
This would allow each app to have their own configurable prefix providing a namespace.
It still doesn't guarantee two children won't use the same prefix . $key, but at least it gives the developers a sensible way out of the dilemma.
Frameworks could have standards to reduce the probability of collision. Ex, Drupal could standardize on 'Drupal_Modulename_site' as the default.
The 'site' part covers multisite.