[Cache] Add namespace handling to all adapters#18024
Merged
fabpot merged 1 commit intosymfony:masterfrom Mar 10, 2016
Merged
Conversation
b15bd78 to
fe8e9ff
Compare
| if (!isset($directory[0])) { | ||
| $directory = sys_get_temp_dir().'/symfony-cache'; | ||
| } | ||
| if (!isset($namespace[0])) { |
Contributor
There was a problem hiding this comment.
shouldn't it be the opposite?
fe8e9ff to
ea0647b
Compare
| public function __construct($directory, $defaultLifetime = null) | ||
| public function __construct($directory, $defaultLifetime = 0, $namespace = '') | ||
| { | ||
| parent::__construct('', $defaultLifetime); |
Contributor
There was a problem hiding this comment.
shouldn't the $namespace be also passed as the first argument to the parent call?
Member
Author
There was a problem hiding this comment.
no because we handle it differently here: we create a subdir to isolate "namespaces" so there is no need to isolate using key prefixing by the abstract adapter
Member
|
👍 |
d5b8458 to
d0530e8
Compare
d0530e8 to
5068f87
Compare
Member
|
Thank you @nicolas-grekas. |
fabpot
added a commit
that referenced
this pull request
Mar 10, 2016
…s-grekas) This PR was merged into the 3.1-dev branch. Discussion ---------- [Cache] Add namespace handling to all adapters | Q | A | ------------- | --- | Branch | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This allows more flexible handling of adapters, allowing e.g. to take one cache pool and split in in several sub-pools by using ProxyAdapter. Commits ------- 5068f87 [Cache] Add namespace handling to all adapters
Merged
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.
This allows more flexible handling of adapters, allowing e.g. to take one cache pool and split in in several sub-pools by using ProxyAdapter.