Olam International is a leading agri-business operating from seed to shelf in 70 countries, supplying food and industrial raw materials to over 16,200 customers worldwide.
Over 3 phases, we took the existing site and reduced the average load time by over 90%, while increasing the functionality many times over.
Olam's website is reasonably large, spanning many thousands of pages. The nature of the website hierarchy means we need to load hundreds of links into the top navigation regularly, which was slowing the site down. Speed was key to this project, so on top of WPEngine's built in caching system we implemented a method of saving key bits of rendered HTML in the WordPress transient cache as well, so that instead of recreating those items every time, we only created them when they changed. We then implemented actions in the admin system that automatically deleted the relevant transients whenever an update occurred. This allowed us to load the HTML for a 300+ item menu is less than a few hundredths of a second, but not restrict the content managers from easily updating their site.
// clears the menu and updates cache whenever a post is saved or deleted
function delete_cache_transient( $post_id ) {
// Delete 'site-wide' transients
delete_transient( 'cached_all_cwd_pages' );
// Delete post/page specific transients
$transient_name = 'cached-tr-post-' .$post_id;
delete_transient( $transient_name );
}
add_action( 'save_post', 'delete_menu_transient' );
add_action( 'deleted_post', 'delete_menu_transient' );