WP_Object_Cache::__set() WordPress Method
The WP_Object_Cache::__set() method is used to add an object to the cache. It is stored with the given key and is available for retrieval with the get() method.
WP_Object_Cache::__set( string $name, mixed $value ) #
Makes private properties settable for backward compatibility.
Contents
Parameters
- $name
(string)(Required)Property to set.
- $value
(mixed)(Required)Property value.
Return
(mixed) Newly-set property.
Source
File: wp-includes/class-wp-object-cache.php
public function __set( $name, $value ) { return $this->$name = $value; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.0.0 | Introduced. |