PHP code example of yamiko / cache-administration-bundle
1. Go to this page and download the library: Download yamiko/cache-administration-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yamiko / cache-administration-bundle example snippets
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Yamiko\CacheAdministrationBundle\YamikoCacheAdministrationBundle(),
);
// ...
}
// ...
}
// ...
public function someAction()
{
$cacheManager = $this->get('yamiko_cache_administration.cache_manager');
// clear annotations cache
$cacheManager->clearAnnotations();
// clear assetic cache
$cacheManager->clearAssetic();
//clear doctrine cache
$cacheManager->clearDoctrine();
// clear translations cache
$cacheManager->clearTranslations();
// clear profiles
$cacheManager->clearProfiles();
// clear container cache
$cacheManager->clearContainer();
//clear routing cache
$cacheManager->clearRouting();
// clear class map
$cacheManager->clearClasses();
// clear tempaltes
$cacheManager->clearTemplates();
// clear everything
$cacheManager->clearAll();
}
// ...