略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: wincache_ucache_clear

2024-12-22

wincache_ucache_clear

(PECL wincache >= 1.1.0)

wincache_ucache_clear Deletes entire content of the user cache

说明

wincache_ucache_clear(): bool

Clears/deletes all the values stored in the user cache.

参数

此函数没有参数。

返回值

成功时返回 true, 或者在失败时返回 false

范例

示例 #1 using wincache_ucache_clear()

<?php
wincache_ucache_set
('green'1);
wincache_ucache_set('red'2);
wincache_ucache_set('orange'4);
wincache_ucache_set('blue'8);
wincache_ucache_set('cyan'16);
$array1 = array('green''red''orange''blue''cyan');
var_dump(wincache_ucache_get($array1));
var_dump(wincache_ucache_clear());
var_dump(wincache_ucache_get($array1));
?>

以上例程会输出:

array(5) { ["green"]=> int(1) 
           ["red"]=> int(2) 
           ["orange"]=> int(4) 
           ["blue"]=> int(8) 
           ["cyan"]=> int(16) } 
bool(true) 
bool(false) 

参见

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/function.wincache-ucache-clear.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3