|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59003 apc_delete disable check if key is missing
Submitted: 2009-12-22 11:12 UTC Modified: 2016-11-18 20:55 UTC
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: marc dot bennewitz at giata dot de Assigned:
Status: Wont fix Package: APC (PECL)
PHP Version: 5.3.0 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: marc dot bennewitz at giata dot de
New email:
PHP Version: OS:


 [2009-12-22 11:12 UTC] marc dot bennewitz at giata dot de
For the most users calling apc_delete it is only impotent the the key or keys are no more available in the cache.

Than to check if the key is removed a simple
if (apc_delete($key) === true)
isn't enough because apc_delete return also false if the given $key doesn't exist in the cache. Therefor an additional apc_fetch($key, $success) is needed to test this :(

It isn't wrong at all but the additional check if some other problems occurred is pretty overhead.

If the a chance to change the return value if file is missing (e.g. null) or to add a second argument like the following: ?
apc_delete(string $key, [bool $falseOnMissing])

Thanking you in anticipation.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-18 20:55 UTC]
-Status: Open +Status: Wont fix
 [2016-11-18 20:55 UTC]
APC is no longer supported in favor of opcache that comes bundled with PHP, if you wish to use the user cache, then look at PECL/APCu.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 03:01:28 2024 UTC