apc_delete_file
(PECL apc >= 3.1.1)
apc_delete_file — Deletes files from the opcode cache
인수
- keys
-
The files to be deleted. Accepts a string, array of strings, or an APCIterator object.
반환값
성공할 경우 TRUE를, 실패할 경우 FALSE를 반환합니다. Or if keys is an array, then an empty array is returned on success, or an array of failed files is returned.
예제
Example #1 apc_delete_file() example
<?php
$filename = 'file.php';
if (apc_compile_file($filename)) {
if (apc_delete_file($filename)) {
echo "Successfully deleted file $filename from APC cache.", PHP_EOL;
}
}
if (apc_compile_file($filename)) {
if ($good = apc_delete_file(array($filename, 'donotexist.php'))) {
var_dump($good);
}
}
$bad = apc_delete_file('donotexist.php');
var_dump($bad);
?>
위 예제의 출력 예시:
Successfully deleted file file.php from APC cache.
[Mon May 24 09:30:33 2010] [apc-warning] Could not stat file donotexist.php, unable to delete from cache. in /tmp/test.php on line 13.
array(1) {
[0]=>
string(14) "donotexist.php"
}
[Mon May 24 09:30:33 2010] [apc-warning] Could not stat file donotexist.php, unable to delete from cache. in /tmp/test.php on line 18.
bool(false)
참고
- apc_clear_cache() - Clears the APC cache
- apc_delete() - Removes a stored variable from the cache
- apc_exists() - Checks if APC key exists
There are no user contributed notes for this page.
