首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

apcu_delete

(PECL apcu >= 4.0.0)

apcu_delete - 从缓存中删除存储的变量

描述

代码语言:javascript
复制
bool apcu_delete ( mixed $key )

从缓存中删除存储的变量。

参数

key

key用于存储值作为字符串为单个键,或为字符串为多个键的阵列,或作为 APCUIterator 对象。

返回值

TRUE成功时或FALSE失败时返回。

例子

Example #1 A apcu_delete() example

代码语言:javascript
复制
<?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_#'));
?>

扫码关注腾讯云开发者

领取腾讯云代金券