apcu_delete
(PECL apcu >= 4.0.0)
apcu_delete - 从缓存中删除存储的变量
描述
bool apcu_delete ( mixed $key )
从缓存中删除存储的变量。
参数
key
key
用于存储值作为字符串为单个键,或为字符串为多个键的阵列,或作为 APCUIterator 对象。
返回值
TRUE
成功时或FALSE
失败时返回。
例子
Example #1 A apcu_delete() example
<?php
$bar = 'BAR';
apcu_store('foo', $bar);
apcu_delete('foo');
// this is obviously useless in this form
// Alternatively delete multiple keys.
apcu_delete(['foo', 'bar', 'baz']);
// Or use an Iterator with a regular expression.
apcu_delete(new APCUIterator('#^myprefix_#'));
?>
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com