Each WordPress environment is provisioned with its own siloed Memcached cluster for persistently caching application-level data. The WordPress object cache (and transients) is automatically configured to use these instances. This enables common operations to be automatically routed to memory instead of the database.
This also means that any application data can be easily cached in memory to reduce the cost of repetitive or expensive computations. The best candidates for caching are any data that will take longer to calculate (such as expensive database queries) than it takes to retrieve the data from the cache. Keep in mind that each object cache request is processed over a local network, so many cache lookups/sets can add processing time to the page.
Cache entries must be kept under 1MB in size.
Because transients are stored in the object cache on VIP, any plugins or custom code that query the database for transients will fail. Similarly, the
wp transient list WP-CLI command will not work as expected because it performs a database query.
As an alternative, individual transients can be managed with the
wp transient WP-CLI command if the key for the transient is known.
Read WP_Object_Cache to learn more about object caching in WordPress.