wp_object_cache

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:

About these ads

One Response to “wp_object_cache”


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: