Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[RFC] [Config] Use a Factory for ConfigCache instances #7781

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

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix merge glitch and missed optimization
  • Loading branch information
mpdude committed Nov 24, 2013
commit b9cbd476306d161424de510fdfeec45d0cdd9387
8 changes: 4 additions & 4 deletions src/Symfony/Component/Routing/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,16 @@ public function getMatcher()
}

$class = $this->options['matcher_cache_class'];
$routerOptions = $this->options;
$baseClass = $this->options['matcher_base_class'];
$self = $this;

$cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'].'/'.$class.'.php',
function($cache) use ($routerOptions, $self, $class) {
$dumper = $this->getMatcherDumperInstance();
function($cache) use ($self, $class, $baseClass) {
$dumper = $self->getMatcherDumperInstance();

$options = array(
'class' => $class,
'base_class' => $routerOptions['matcher_base_class'],
'base_class' => $baseClass,
);

$cache->write($dumper->dump($options), $self->getRouteCollection()->getResources());
Expand Down