File tree 1 file changed +3
-2
lines changed
src/Symfony/Component/HttpKernel/HttpCache
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,9 @@ public function add(Response $response)
81
81
return ;
82
82
}
83
83
84
- $ this ->storeRelativeAgeDirective ('max-age ' , $ response ->headers ->getCacheControlDirective ('max-age ' ), $ age );
85
- $ sharedMaxAge = $ response ->headers ->hasCacheControlDirective ('s-maxage ' ) ? $ response ->headers ->getCacheControlDirective ('s-maxage ' ) : $ response ->headers ->getCacheControlDirective ('max-age ' );
84
+ $ maxAge = $ response ->headers ->hasCacheControlDirective ('max-age ' ) ? (int ) $ response ->headers ->getCacheControlDirective ('max-age ' ) : null ;
85
+ $ this ->storeRelativeAgeDirective ('max-age ' , $ maxAge , $ age );
86
+ $ sharedMaxAge = $ response ->headers ->hasCacheControlDirective ('s-maxage ' ) ? (int ) $ response ->headers ->getCacheControlDirective ('s-maxage ' ) : $ maxAge ;
86
87
$ this ->storeRelativeAgeDirective ('s-maxage ' , $ sharedMaxAge , $ age );
87
88
88
89
$ expires = $ response ->getExpires ();
You can’t perform that action at this time.
0 commit comments