Skip to content

Commit

Permalink
Sync with WPcom
Browse files Browse the repository at this point in the history
This cache is being invalidated when a post is modified so we can cache it for longer. Will probably help the Sun's performance
  • Loading branch information
sboisvert committed Jan 9, 2017
1 parent 9cba4cf commit 72c30ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vip-helpers/vip-caching.php
Expand Up @@ -198,7 +198,7 @@ function wpcom_vip_get_page_by_path( $page_path, $output = OBJECT, $post_type =
if ( 0 === $page_id ) {
wp_cache_set( $cache_key, $page_id, 'get_page_by_path', ( 1 * HOUR_IN_SECONDS + mt_rand( 0, HOUR_IN_SECONDS ) ) ); // We only store the ID to keep our footprint small
} else {
wp_cache_set( $cache_key, $page_id, 'get_page_by_path', ( 12 * HOUR_IN_SECONDS + mt_rand( 0, HOUR_IN_SECONDS ) ) ); // We only store the ID to keep our footprint small
wp_cache_set( $cache_key, $page_id, 'get_page_by_path', 0 ); // We only store the ID to keep our footprint small
}
}

Expand Down

1 comment on commit 72c30ad

@mjangda
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was merged over in r86892-deploy

Please sign in to comment.