返回介绍

wp_cache_get()

发布于 2017-09-11 11:36:46 字数 5508 浏览 1065 评论 0 收藏 0

wp_cache_get( int|string $key,  string $group = '',  bool $force = false,  bool $found = null )

Retrieves the cache contents from the cache by key and group.


description


参数

$key

(int|string) (Required) The key under which the cache contents are stored.

$group

(string) (Optional) Where the cache contents are grouped.

Default value: ''

$force

(bool) (Optional) Whether to force an update of the local cache from the persistent cache.

Default value: false

$found

(bool) (Optional) Whether the key was found in the cache. Disambiguates a return of false, a storable value. Passed by reference.

Default value: null


返回值

(bool|mixed) False on failure to retrieve contents or the cache contents on success


源代码

File: wp-includes/cache.php

function wp_cache_get( $key, $group = '', $force = false, &$found = null ) {
	global $wp_object_cache;

	return $wp_object_cache->get( $key, $group, $force, $found );
}

更新日志

Versiondescription
2.0.0Introduced.

相关函数

Uses

  • wp-includes/cache.php: WP_Object_Cache::get()

Used By

  • wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::find_changeset_post_id()
  • wp-includes/functions.php: wp_cache_get_last_changed()
  • wp-includes/class-wp-term-query.php: WP_Term_Query::get_terms()
  • wp-includes/class-wp-network-query.php: WP_Network_Query::get_networks()
  • wp-includes/class-wp-site.php: WP_Site::get_details()
  • wp-includes/ms-load.php: ms_load_current_site_and_network()
  • wp-includes/class-wp-site-query.php: WP_Site_Query::get_sites()
  • wp-includes/class-wp-site.php: WP_Site::get_instance()
  • wp-includes/class-wp-network.php: WP_Network::get_instance()
  • wp-includes/class-wp-network.php: WP_Network::get_by_path()
  • wp-includes/class-wp-comment.php: WP_Comment::get_instance()
  • wp-includes/class-wp-comment-query.php: WP_Comment_Query::fill_descendants()
  • wp-includes/class-wp-term.php: WP_Term::get_instance()
  • wp-includes/option.php: update_network_option()
  • wp-includes/option.php: add_network_option()
  • wp-includes/option.php: get_network_option()
  • wp-admin/includes/class-wp-ms-sites-list-table.php: WP_MS_Sites_List_Table::column_users()
  • wp-includes/class-wp-comment-query.php: WP_Comment_Query::get_comments()
  • wp-admin/includes/plugin.php: get_plugins()
  • wp-includes/class-wp-user.php: WP_User::get_data_by()
  • wp-includes/general-template.php: wp_get_archives()
  • wp-includes/general-template.php: get_calendar()
  • wp-includes/deprecated.php: get_usermeta()
  • wp-includes/class-wp-theme.php: WP_Theme::cache_get()
  • wp-includes/deprecated.php: get_all_category_ids()
  • wp-includes/functions.php: _get_non_cached_ids()
  • wp-includes/functions.php: is_blog_installed()
  • wp-includes/taxonomy.php: get_object_term_cache()
  • wp-includes/taxonomy.php: update_object_term_cache()
  • wp-includes/link-template.php: get_adjacent_post()
  • wp-includes/option.php: get_site_transient()
  • wp-includes/option.php: get_transient()
  • wp-includes/option.php: wp_load_alloptions()
  • wp-includes/option.php: update_option()
  • wp-includes/option.php: add_option()
  • wp-includes/option.php: get_option()
  • wp-includes/class-wp-post.php: WP_Post::get_instance()
  • wp-includes/post.php: wp_mime_type_icon()
  • wp-includes/post.php: _get_last_post_time()
  • wp-includes/post.php: get_all_page_ids()
  • wp-includes/post.php: get_page_by_path()
  • wp-includes/post.php: get_pages()
  • wp-includes/post.php: wp_count_posts()
  • wp-includes/ms-functions.php: get_blog_id_from_url()
  • wp-includes/bookmark.php: get_bookmark()
  • wp-includes/bookmark.php: get_bookmarks()
  • wp-includes/ms-blogs.php: get_blog_details()
  • wp-includes/comment.php: wp_count_comments()
  • wp-includes/comment.php: get_lastcommentmodified()
  • wp-includes/meta.php: get_metadata()
  • wp-includes/meta.php: metadata_exists()
  • wp-includes/meta.php: update_meta_cache()
  • Show 47 more used by Hide more used by

User Contributed Notes

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文