wp_cache_get()获取一个缓存变量

目录

描述

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

wp_cache_get() 描述

用法

<?php wp_cache_get$key$group$force$found ); ?>

wp_cache_get() 用法

参数

$key

(int/string) (必填) the key to indicate the value.

默认值: None

$group

(string) (可选) this is a way of grouping data within the cache. Allows you to use the same key across different groups.

默认值: None

$force

(boolean) (可选) Whether to force an update of the local cache from the persistent cache (default is false)

默认值: false

$found

(&boolean) (可选) Whether key was found in the cache. Disambiguates a return of false, a storable value

默认值: None

wp_cache_get() 参数

历史

添加于 版本: 2.0.0

wp_cache_get() 历史

源文件

wp_cache_get() 函数的代码位于 wp-includes/cache.php.

wp_cache_get() 源文件

相关