Skip to content

Uncached functions

For various reasons, some functions in WordPress Core are purposely uncached. Because of this, calling those uncached functions in application code will always result in an SQL query. This can have performance implications for a site, particularly if an uncached function is called by code during a high traffic event. A large volume of direct SQL queries can overload the primary database and lead to an increase in responses with a 503 HTTP status code.

Cached VIP alternative functions

To prevent issues caused by uncached functions, VIP MU plugins provides several alternative versions of functions that will be cached when called on the VIP Platform.

Use wpcom_vip_attachment_url_to_postid() as the cached VIP alternative to:

Use wpcom_vip_count_user_posts() as the cached VIP alternative to:

Use wpcom_vip_get_adjacent_post() as the cached VIP alternative to:

Use wpcom_vip_wp_oembed_get() as the cached VIP alternative to:

Use wpcom_vip_url_to_postid() as the cached VIP alternative to:

Use wpcom_vip_old_slug_redirect() as the cached VIP alternative to:

Last updated: September 23, 2025

Relevant to

  • WordPress