Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Plugin/Framework/App/Response/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ public function afterSetNoCacheHeaders(\Magento\Framework\App\Response\Http $sub
*/
private function isRequestCacheable(string $cacheControl): bool
{
// FPC hits will not have public or private cache control directives -- already processed
if (!str_contains($cacheControl, 'public')
&& !str_contains($cacheControl, 'private')
&& !str_contains($cacheControl, 'no-store')) {
return true;
}

// FPC misses will be cacheable if they have a public directive
return (bool) preg_match('/public.*s-maxage=(\d+)/', $cacheControl);
}

Expand Down
Loading