Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
define a WarmableInterface and only warm the cache if it implements w…
…armable to allow replacing the core router. this fixes #2422. combining routers will only really work when #2450 is merged too.
- Loading branch information
Showing
3 changed files
with
49 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
27 changes: 27 additions & 0 deletions
27
src/Symfony/Bundle/FrameworkBundle/CacheWarmer/WarmableInterface.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; | ||
|
||
/** | ||
* Interface for services that support warming their cache. | ||
* | ||
* @author Fabien Potencier <fabien@symfony.com> | ||
*/ | ||
interface WarmableInterface | ||
{ | ||
/** | ||
* Warms up the cache. | ||
* | ||
* @param string $cacheDir The cache directory | ||
*/ | ||
public function warmUp($cacheDir); | ||
} |
This file contains 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