@@ -23,18 +23,34 @@ instance, the framework bundle is configured in ``config/packages/framework.yaml
23
23
framework :
24
24
secret : ' %env(APP_SECRET)%'
25
25
# default_locale: en
26
- # csrf_protection: ~
26
+ # csrf_protection: true
27
27
# http_method_override: true
28
- # trusted_hosts: ~
29
- # https://symfony.com/doc/current/reference/configuration/framework.html#handler-id
30
- # session:
31
- # # The native PHP session handler will be used
32
- # handler_id: ~
33
- # esi: ~
34
- # fragments: ~
28
+
29
+ # Enables session support. Note that the session will ONLY be started if you read or write from it.
30
+ # Remove or comment this section to explicitly disable session support.
31
+ session :
32
+ handler_id : ~
33
+
34
+ # esi: true
35
+ # fragments: true
35
36
php_errors :
36
37
log : true
37
38
39
+ cache :
40
+ # Put the unique name of your app here: the prefix seed
41
+ # is used to compute stable namespaces for cache keys.
42
+ # prefix_seed: your_vendor_name/app_name
43
+
44
+ # The app cache caches to the filesystem by default.
45
+ # Other options include:
46
+
47
+ # Redis
48
+ # app: cache.adapter.redis
49
+ # default_redis_provider: redis://localhost
50
+
51
+ # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
52
+ # app: cache.adapter.apcu
53
+
38
54
.. code-block :: xml
39
55
40
56
<!-- config/packages/framework.xml -->
@@ -46,6 +62,30 @@ instance, the framework bundle is configured in ``config/packages/framework.yaml
46
62
http://symfony.com/schema/dic/framework http://symfony.com/schema/dic/framework/framework-1.0.xsd"
47
63
>
48
64
<framework : config secret =" %env(APP_SECRET)%" >
65
+ <!-- <framework:csrf-protection enabled="true“ />-->
66
+ <!-- <framework:esi enabled="true" />-->
67
+ <!-- <framework:fragments enabled="true" />-->
68
+
69
+ <!-- Enables session support. Note that the session will ONLY be started if you read or write from it.
70
+ Remove or comment this section to explicitly disable session support. -->
71
+ <framework : session />
72
+
73
+ <!-- Put the unique name of your app here: the prefix seed
74
+ is used to compute stable namespaces for cache keys.
75
+ <framework:cache prefix-seed="your_vendor_name/app_name">
76
+ -->
77
+ <framework : cache >
78
+ <!-- The app cache caches to the filesystem by default.
79
+ Other options include: -->
80
+
81
+ <!-- Redis -->
82
+ <!-- <framework:app>cache.adapter.redis</framework:app>-->
83
+ <!-- <framework:default-redis-provider>redis://localhost</framework:default-redis-provider>-->
84
+
85
+ <!-- APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) -->
86
+ <!-- <framework:app>cache.adapter.apcu</framework:app>-->
87
+ </framework : cache >
88
+
49
89
<framework : php-errors log =" true" />
50
90
</framework : config >
51
91
</container >
@@ -56,19 +96,32 @@ instance, the framework bundle is configured in ``config/packages/framework.yaml
56
96
$container->loadFromExtension('framework', [
57
97
'secret' => '%env(APP_SECRET)%',
58
98
//'default_locale' => 'en',
59
- //'csrf_protection' => null ,
99
+ //'csrf_protection' => true ,
60
100
//'http_method_override' => true,
61
- //'trusted_hosts' => null,
62
- // https://symfony.com/doc/current/reference/configuration/framework.html#handler-id
63
- //'session' => [
64
- // // The native PHP session handler will be used
65
- // 'handler_id' => null,
66
- // ],
67
- //'esi' => null ,
68
- //'fragments' => null ,
101
+
102
+ // Enables session support. Note that the session will ONLY be started if you read or write from it.
103
+ // Remove or comment this section to explicitly disable session support.
104
+ ' session' => [
105
+ 'handler_id' => null,
106
+ ],
107
+ //'esi' => true ,
108
+ //'fragments' => true ,
69
109
'php_errors' => [
70
110
'log' => true,
71
111
],
112
+ 'cache' => [
113
+ //'prefix_seed' => 'your_vendor_name/app_name',
114
+
115
+ // The app cache caches to the filesystem by default.
116
+ // Other options include:
117
+
118
+ // Redis
119
+ //'app' => 'cache.adapter.redis',
120
+ //'default_redis_provider: 'redis://localhost',
121
+
122
+ // APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
123
+ //'app' => 'cache.adapter.apcu',
124
+ ],
72
125
]);
73
126
74
127
The top-level key (here ``framework ``) references configuration for a specific
0 commit comments