mirror of
https://github.com/symfony/symfony-docs.git
synced 2026-03-24 00:32:14 +01:00
minor #21654 [HttpKernel] Split cache examples (as it's not repeatable) (tcoch)
This PR was merged into the 6.4 branch.
Discussion
----------
[HttpKernel] Split cache examples (as it's not repeatable)
Since `#[Cache]` attribute is not repeatable, I propose to correct the example in the doc with this new version in order to avoid in confusion
Commits
-------
b9cec7864 Split cache examples
This commit is contained in:
@@ -41,8 +41,13 @@ attribute::
|
||||
// ...
|
||||
|
||||
#[Cache(vary: ['Accept-Encoding'])]
|
||||
public function foo(): Response
|
||||
{
|
||||
// ...
|
||||
}
|
||||
|
||||
#[Cache(vary: ['Accept-Encoding', 'User-Agent'])]
|
||||
public function index(): Response
|
||||
public function bar(): Response
|
||||
{
|
||||
// ...
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user