Skip to content

Commit

Permalink
Set the browser cache TTL in CloudFlare
Browse files Browse the repository at this point in the history
  • Loading branch information
Tabrisrp committed Oct 10, 2016
1 parent 5c49f94 commit 923c79c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion inc/admin/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,10 @@ function rocket_after_save_options( $oldvalue, $value ) {
// Deactivate Rocket Loader to prevent conflicts
$cf_rocket_loader = ( isset( $cf_old_settings[2] ) && $value['cloudflare_auto_settings'] == 0 ) ? $cf_old_settings[2] : 'off';
set_rocket_cloudflare_rocket_loader( $cf_rocket_loader );

// Set Browser cache to 1 month
$cf_browser_cache_ttl = ( isset( $cf_old_settings[3] ) && $value['cloudflare_auto_settings'] == 0 ) ? $cf_old_settings[3] : '2678400';
set_rocket_cloudflare_browser_cache_ttl( $cf_browser_cache_ttl );
}

// Regenerate advanced-cache.php file
Expand Down Expand Up @@ -1186,4 +1190,4 @@ function rocket_database_count_cleanup_items( $type ) {
}

return $count;
}
}

0 comments on commit 923c79c

Please sign in to comment.