You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+11
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,17 @@
4
4
### Added
5
5
6
6
- New `methods` setting which allows to configure the request methods which can be cached.
7
+
- New `respect_response_cache_directives` config setting to define specific cache directives to respect when handling responses.
8
+
- Introduced `CachePlugin::clientCache` and `CachePlugin::serverCache` factory methods to easily setup the plugin with
9
+
the correct config settigns for each usecase.
10
+
11
+
### Changed
12
+
13
+
- The `no-cache` directive is now respected by the plugin and will not cache the response
14
+
15
+
### Deprecated
16
+
17
+
- The `respect_cache_headers` option is deprecated and will be removed in 2.0. This option is replaced by the new `respect_response_cache_directives` option.
@@ -292,6 +350,22 @@ private function configureOptions(OptionsResolver $resolver)
292
350
293
351
returnempty($matches);
294
352
});
353
+
354
+
$resolver->setNormalizer('respect_cache_headers', function (Options$options, $value) {
355
+
if (null !== $value) {
356
+
@trigger_error('The option "respect_cache_headers" is deprecated since version 1.3 and will be removed in 2.0. Use "respect_response_cache_directives" instead.', E_USER_DEPRECATED);
357
+
}
358
+
359
+
return$value;
360
+
});
361
+
362
+
$resolver->setNormalizer('respect_response_cache_directives', function (Options$options, $value) {
363
+
if (false === $options['respect_cache_headers']) {
0 commit comments