Uses
Uses | Description |
---|---|
wp-includes/class-wp-object-cache.php: WP_Object_Cache::_exists() | Serves as a utility function to determine whether a key exists in the cache. |
Removes the contents of the cache key in the group.
If the cache key does not exist in the group, then nothing will happen.
(int|string) (Required) What the contents in the cache are called.
(string) (Optional) Where the cache contents are grouped.
Default value: 'default'
(bool) (Optional) Unused.
Default value: false
(bool) False if the contents weren't deleted and true on success.
File: wp-includes/class-wp-object-cache.php
public function delete( $key, $group = 'default', $deprecated = false ) { if ( empty( $group ) ) { $group = 'default'; } if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) ) { $key = $this->blog_prefix . $key; } if ( ! $this->_exists( $key, $group ) ) { return false; } unset( $this->cache[ $group ][ $key ] ); return true; }
Version | Description |
---|---|
2.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_object_cache/delete