On this page
WP_Object_Cache::__construct()
Sets up object properties; PHP 5 style constructor.
Source
File: wp-includes/class-wp-object-cache.php. View all references
public function __construct() {
$this->multisite = is_multisite();
$this->blog_prefix = $this->multisite ? get_current_blog_id() . ':' : '';
}
Related
Uses
| Uses | Description |
|---|---|
| is_multisite() wp-includes/load.php | If Multisite is enabled. |
| get_current_blog_id() wp-includes/load.php | Retrieve the current site ID. |
Used By
| Used By | Description |
|---|---|
| wp_cache_init() wp-includes/cache.php | Sets up Object Cache Global and assigns it. |
Changelog
| Version | Description |
|---|---|
| 2.0.8 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_object_cache/__construct