This caches WordPress data like options, user data, pages, etc. It should be noted that it is used only if cache is enabled.
It is an instance of class WP_Object_Cache defined in [wordpress root folder]/wp-includes/cache.php. WordPress provides functions to operate on this variable, this variable need not be accessed directly. It is possible that even these functions are not required to be accessed directly by the plugin author, they are invoked internally by lot of WordPress functions. The functions are:
- wp_cache_add($key, $data, $flag = ”, $expire = 0)
- wp_cache_close()
- wp_cache_delete($id, $flag = ”)
- wp_cache_delete($id, $flag = ”)
- wp_cache_get($id, $flag = ”)
- wp_cache_init()
- wp_cache_replace($key, $data, $flag = ”, $expire = 0)
- wp_cache_set($key, $data, $flag = ”, $expire = 0)
Back to full list of global variables.
Technorati tags: wp_object_cache

February 25th, 2006 at 7:55 am
[...] $wp_object_cache [...]