mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/16956] Remove router cache flag
The deferred purge will be used in the future instead. The cache flag in the router only causes additional issues by trying to rebuild the routing mid-request PHPBB3-16956
This commit is contained in:
@@ -80,11 +80,6 @@ class router implements RouterInterface
|
||||
*/
|
||||
protected $cache_dir;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $use_cache;
|
||||
|
||||
/**
|
||||
* Construct method
|
||||
*
|
||||
@@ -102,7 +97,6 @@ class router implements RouterInterface
|
||||
$this->php_ext = $php_ext;
|
||||
$this->context = new RequestContext();
|
||||
$this->cache_dir = $cache_dir;
|
||||
$this->use_cache = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -182,22 +176,6 @@ class router implements RouterInterface
|
||||
return $this->get_matcher()->match($pathinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the use of a cached URL generator and matcher
|
||||
*/
|
||||
public function with_cache()
|
||||
{
|
||||
$this->use_cache = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables the use of a cached URL generator and matcher
|
||||
*/
|
||||
public function without_cache()
|
||||
{
|
||||
$this->use_cache = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the UrlMatcher instance associated with this Router.
|
||||
*
|
||||
@@ -220,12 +198,6 @@ class router implements RouterInterface
|
||||
*/
|
||||
protected function create_dumped_url_matcher()
|
||||
{
|
||||
if (!$this->use_cache)
|
||||
{
|
||||
$this->create_new_url_matcher();
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$cache = new ConfigCache("{$this->cache_dir}url_matcher.{$this->php_ext}", defined('DEBUG'));
|
||||
@@ -281,12 +253,6 @@ class router implements RouterInterface
|
||||
*/
|
||||
protected function create_dumped_url_generator()
|
||||
{
|
||||
if (!$this->use_cache)
|
||||
{
|
||||
$this->create_new_url_generator();
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$cache = new ConfigCache("{$this->cache_dir}url_generator.{$this->php_ext}", defined('DEBUG'));
|
||||
|
Reference in New Issue
Block a user