note 116425 deleted from function.apc-delete by salathe
| From: | salathe@php.net | Date: | Fri, 02 Jan 2015 11:36:06 +0000 |
| Subject: | note 116425 deleted from function.apc-delete by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-201342@lists.php.net to get a copy of this message | ||
Note Submitter: Graham B
----
There's a condition to J Fox's use of deleting using an APCIterator; you cannot use this
method if the iterator has been iterated:
<?php
apc_store('foo', 'bar');
$iterator = new APCIterator('user', '/^foo/', APC_ITER_ALL);
foreach ($iterator as $item) {
}
apc_delete($iterator);
var_dump(apc_fetch('foo')); // => string(3) "bar"
$iterator = new APCIterator('user', '/^foo/', APC_ITER_ALL);
apc_delete($iterator);
var_dump(apc_fetch('foo')); // => bool(false)
?>