From 063c994467c48d85f90f582f2e2f034927ea0837 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 26 Oct 2020 09:31:37 -0700 Subject: [PATCH] Supply cache_name for AMP script caching strategy in PWA --- includes/class-amp-service-worker.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/class-amp-service-worker.php b/includes/class-amp-service-worker.php index dea6cad655c..146d429331a 100644 --- a/includes/class-amp-service-worker.php +++ b/includes/class-amp-service-worker.php @@ -114,7 +114,8 @@ static function() { $service_workers->caching_routes()->register( '^https:\/\/cdn\.ampproject\.org\/.*', [ - 'strategy' => WP_Service_Worker_Caching_Routes::STRATEGY_STALE_WHILE_REVALIDATE, + 'strategy' => WP_Service_Worker_Caching_Routes::STRATEGY_STALE_WHILE_REVALIDATE, + 'cache_name' => 'amp-cdn', ] ); }