|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-16 04:51 UTC] swen dot thuemmler at telefonica dot de
[2004-09-16 12:49 UTC] rasmus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 16:00:01 2025 UTC |
Description: ------------ I think there is an incorrect warning given when apc_cache_insert() fails, because another process already cached a file. In apc_main.c we have: if (!apc_cache_insert(APCG(cache), key, cache_entry, t)) { apc_cache_free_entry(cache_entry); apc_cache_expunge(APCG(cache),t); /* apc_log(APC_WARNING, "(apc_cache_insert) unable to cache '%s': insufficient " "shared memory available", h->opened_path); */ } and in apc_cache.c, there is: if (key_equals((*slot)->key.data.file, key.data.file)) { /* If existing slot for the same device+inode is older, remove it and insert the new version */ if ((*slot)->key.mtime < key.mtime) { remove_slot(cache, slot); break; } UNLOCK(cache); return 0; } So it returns 0, when the same file is already cached by another process and should not be cached again. Question is, should the function return 1 in this case, or should the warning be moved into the function, given only when there is really no memory left? I'll have to check, whether this accounts for my comment on bug #1583 - the message might have been a red herring. Greetings, Swen