Caching Strategies
-
I want to set site assets caching into stale while revalidate and image caching into cache first. Is the following filter correct?
add_filter(
‘wp_service_worker_theme_asset_caching’,
function ( $config ) {
$config[‘strategy’] = WP_Service_Worker_Caching_Routes::STRATEGY_STALE_WHILE_REVALIDATE;add_filter(
‘wp_service_worker_plugin_asset_caching’,
function ( $config ) {
$config[‘strategy’] = WP_Service_Worker_Caching_Routes::STRATEGY_STALE_WHILE_REVALIDATE;add_filter(
‘wp_service_worker_core_asset_caching’,
function ( $config ) {
$config[‘strategy’] = WP_Service_Worker_Caching_Routes::STRATEGY_STALE_WHILE_REVALIDATE;add_filter(
‘wp_service_worker_uploaded_image_caching’,
function ( $config ) {
$config[‘strategy’] = WP_Service_Worker_Caching_Routes::STRATEGY_CACHE_FIRST;The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.