|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-12-18 17:26 UTC] dennis dot birkholz at nexxes dot net
[2008-12-18 20:19 UTC] shire@php.net
[2008-12-19 09:42 UTC] dennis dot birkholz at nexxes dot net
[2008-12-22 04:57 UTC] gopalv82 at yahoo dot com
[2009-03-02 03:03 UTC] shire@php.net
[2009-03-02 03:32 UTC] dennis dot birkholz at nexxes dot net
[2009-03-02 14:34 UTC] shire@php.net
[2009-04-05 23:28 UTC] shire@php.net
[2009-04-10 08:14 UTC] dennis dot birkholz at nexxes dot net
[2009-04-13 14:50 UTC] shire@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 17:00:01 2025 UTC |
Description: ------------ The manual says that apc_add() will return false if a variable with the supplied name is already in the cache. But if another script runs and has just created a cache variable with the same name (and script execution is not yet finished), the current script blocks until the other script has finished. Run the supplied testscript twice and you will see that is does not work like it is documented. Maybe an apc_flush() function can be added to cause APC to flush and release locks immediately?? Reproduce code: --------------- <?php if (apc_add("testvar", true, 60) { print "Variable created.<br>\n"; flush(); sleep(5); apc_delete("testvar"); print "Variable removed.<br>\n"; } else { print "Variable exists.<br>\n"; } ?> Expected result: ---------------- Script 1: Variable created. [5 seconds later] Variable removed. Script 2: Variable exists. Actual result: -------------- Script 1: Variable created. [5 seconds later] Variable removed. Script 2: [5 seconds later] Variable created. [5 seconds later] Variable removed.