ConfigBuilderCacheWarmer example

public function getCacheDir(): string
            {
                return $this->varDir.'/cache';
            }

            public function registerContainerConfiguration(LoaderInterface $loader)
            {
            }
        };
        $kernel->boot();

        $warmer = new ConfigBuilderCacheWarmer($kernel);
        $warmer->warmUp($kernel->getCacheDir());

        self::assertDirectoryExists($kernel->getBuildDir().'/Symfony');
        self::assertDirectoryDoesNotExist($kernel->getCacheDir().'/Symfony');
    }
}
Home | Imprint | This part of the site doesn't use cookies.