File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed
Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ $ composer require toflar/psr6-symfony-http-cache-store
3535
3636## Configuration
3737
38- Use the ` Psr6Store ` by enabling it in your ` AppCache ` as follows:
38+ For the Symfony 3 standard edition file structure, use the ` Psr6Store ` by
39+ enabling it in your ` AppCache ` as follows:
3940
4041``` php
4142<?php
@@ -57,6 +58,16 @@ Use the `Psr6Store` by enabling it in your `AppCache` as follows:
5758
5859```
5960
61+ For the Symfony 4/Flex structure, you need to adjust your ` index.php ` like this:
62+
63+ ``` php
64+ <?php
65+
66+ // public/index.php
67+ $kernel = new Kernel($env, $debug);
68+ $kernel = new HttpCache($kernel, new Psr6Store(['cache_directory' => $kernel->getCacheDir()]));
69+ ```
70+
6071That's it, that's all there is to do. The ` Psr6Store ` will automatically
6172create the best caching and locking adapters available for your local filesystem.
6273
Original file line number Diff line number Diff line change 1818 },
1919 "require-dev" : {
2020 "friendsofphp/php-cs-fixer" : " ^2.6" ,
21- "phpunit/phpunit" : " ^5.7.25 " ,
21+ "phpunit/phpunit" : " ^5.7.27 " ,
2222 "satooshi/php-coveralls" : " 2.0.x-dev"
2323 },
2424 "autoload" : {
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ public function __construct(array $options = [])
120120 }
121121
122122 return new TagAwareAdapter (
123- new FilesystemAdapter ('fos- http-cache ' , 0 , $ options ['cache_directory ' ])
123+ new FilesystemAdapter ('http-cache-tags ' , 0 , $ options ['cache_directory ' ])
124124 );
125125 })->setAllowedTypes ('cache ' , AdapterInterface::class);
126126
You can’t perform that action at this time.
0 commit comments