WP_Object_Cache::__construct() WordPress Method

The WP_Object_Cache class is used to store data in memory for faster access. The object cache is used to improve performance by storing data in memory so that it can be accessed faster. The object cache is used by Wordpress to store data such as the results of database queries. The __construct() method initializes the object cache. This method is called when the object cache is first created. This method sets the cache type and the cache directory.

WP_Object_Cache::__construct() #

Sets up object properties; PHP 5 style constructor.


Source

File: wp-includes/class-wp-object-cache.php

	public function __construct() {
		$this->multisite   = is_multisite();
		$this->blog_prefix = $this->multisite ? get_current_blog_id() . ':' : '';
	}


Top ↑

Changelog

Changelog
VersionDescription
2.0.8Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.