Php 带Symfony反向代理的FOSHttpCache

Php 带Symfony反向代理的FOSHttpCache,php,symfony,caching,foshttpcachebundle,Php,Symfony,Caching,Foshttpcachebundle,因此,我尝试使用默认的Symfony HttpCache配置 以下是我的AppCache.php的内容,根据: 这给了我一个很好的回答: PHP消息:PHP可捕获致命错误:参数2传递给 Symfony\Component\HttpKernel\HttpCache\HttpCache::\uuu construct()必须 举例 Symfony\Component\HttpKernel\HttpCache\StoreInterface,未给出任何值, 在第11行的/php/api/current/

因此,我尝试使用默认的Symfony HttpCache配置

以下是我的AppCache.php的内容,根据:

这给了我一个很好的回答:

PHP消息:PHP可捕获致命错误:参数2传递给 Symfony\Component\HttpKernel\HttpCache\HttpCache::\uuu construct()必须 举例 Symfony\Component\HttpKernel\HttpCache\StoreInterface,未给出任何值, 在第11行的/php/api/current/web/app.php中调用,并在中定义 /php/api/current/vendor/symfony/symfony/src/symfony/Component/HttpKernel/HttpCache/HttpCache.php 在线78

考虑到HttpCache类构造函数,这非常有意义


所以问题是,是不是文档不是最新的,还是只是我遗漏了一些非常明显的东西?

这个解决方案应该是官方文档的一部分!
use Symfony\Component\HttpKernel\HttpCache\Store;

$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$store = new Store('app/cache');
$kernel = new AppCache($kernel, $store);
$kernel = new AppKernel('prod', false);
$kernel->loadClassCache();
$kernel = new AppCache($kernel);
use Symfony\Component\HttpKernel\HttpCache\Store;

$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$store = new Store('app/cache');
$kernel = new AppCache($kernel, $store);