|
@@ 226-231 (lines=6) @@
|
| 223 |
|
$serialized = serialize($arguments); |
| 224 |
|
$id = $this->getAlias().'.request_matcher.'.md5($serialized).sha1($serialized); |
| 225 |
|
|
| 226 |
|
if (!$container->hasDefinition($id)) { |
| 227 |
|
$container |
| 228 |
|
->setDefinition($id, $this->createChildDefinition($this->getAlias().'.request_matcher')) |
| 229 |
|
->setArguments($arguments) |
| 230 |
|
; |
| 231 |
|
} |
| 232 |
|
|
| 233 |
|
return new Reference($id); |
| 234 |
|
} |
|
@@ 248-253 (lines=6) @@
|
| 245 |
|
{ |
| 246 |
|
if (!empty($config['additional_response_status'])) { |
| 247 |
|
$id = $this->getAlias().'cache_control.expression.'.md5(serialize($config['additional_response_status'])); |
| 248 |
|
if (!$container->hasDefinition($id)) { |
| 249 |
|
$container |
| 250 |
|
->setDefinition($id, $this->createChildDefinition($this->getAlias().'.response_matcher.cache_control.cacheable_response')) |
| 251 |
|
->setArguments([$config['additional_response_status']]) |
| 252 |
|
; |
| 253 |
|
} |
| 254 |
|
} elseif (!empty($config['match_response'])) { |
| 255 |
|
$id = $this->getAlias().'cache_control.match_response.'.md5($config['match_response']); |
| 256 |
|
if (!$container->hasDefinition($id)) { |
|
@@ 256-261 (lines=6) @@
|
| 253 |
|
} |
| 254 |
|
} elseif (!empty($config['match_response'])) { |
| 255 |
|
$id = $this->getAlias().'cache_control.match_response.'.md5($config['match_response']); |
| 256 |
|
if (!$container->hasDefinition($id)) { |
| 257 |
|
$container |
| 258 |
|
->setDefinition($id, $this->createChildDefinition($this->getAlias().'.response_matcher.cache_control.expression')) |
| 259 |
|
->replaceArgument(0, $config['match_response']) |
| 260 |
|
; |
| 261 |
|
} |
| 262 |
|
} else { |
| 263 |
|
$id = $this->getAlias().'.response_matcher.cacheable'; |
| 264 |
|
} |