apcu_delete
(PECL apcu >= 4.0.0)
apcu_delete — 캐시에서 저장된 변수를 제거합니다.
설명
apcu_delete(mixed $key
): mixed
캐시에서 저장된 변수를 제거합니다.
매개변수
key
- 단일
key
에 대한 문자열, 여러 키에 대한 문자열 배열 또는 APCUIterator 객체로 값을 저장하는 데 사용되는 키입니다.
반환 값
key
가 배열이면 인덱스된 키 배열이 반환됩니다. 그렇지 않으면 성공하면 true
가, 실패하면 false
가 반환됩니다.
Examples
예제 #1 apcu_delete() 예제
<?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_#'));
?>
기타
- apcu_store() - 데이터 저장소에 변수 캐시
- apcu_fetch() - 캐시에서 저장된 변수 가져오기
- apcu_clear_cache() - APCu 캐시를 지웁니다.
- APCUIterator