Skip to content

fix creating a CacheKernel in HTTP cache documentation #9222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions http_cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ but is a great way to start.
To enable the proxy, first create a caching kernel::

// src/CacheKernel.php
namespace App;

use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;

class CacheKernel extends HttpCache
Expand All @@ -93,6 +95,9 @@ caching kernel:

// public/index.php

use App\Kernel;
+ use App\CacheKernel;

// ...
$kernel = new Kernel($_SERVER['APP_ENV'] ?? 'dev', $_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev')));

Expand Down