php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #65913
Patch apc_cache_dynamic_inheritance revision 2013-10-16 12:48 UTC by seng dot gavin at gmail dot com

Patch apc_cache_dynamic_inheritance for APC Bug #65913

Patch version 2013-10-16 12:48 UTC

Return to Bug #65913 | Download this patch
Patch Revisions:

Developer: seng.gavin@gmail.com

diff --git a/apc_main.c b/apc_main.c
index bd42db2..834627a 100644
--- a/apc_main.c
+++ b/apc_main.c
@@ -658,6 +658,13 @@ static zend_op_array* my_compile_file(zend_file_handle* h,
             apc_warning("Autofiltering %s" TSRMLS_CC, 
                             (h->opened_path ? h->opened_path : h->filename));
             apc_warning("Recompiling %s" TSRMLS_CC, cache_entry->data.file.filename);
+
+            /* Without this, the recompiled opcode will not be cached due to the presence
+             * of the previous cache entry. Due to temporal locality, we cache this.
+             * Also, the dynamic cache entry that causes a class to be fetched at
+             * runtime is always correct and usable.
+             */
+            ctxt.force_update = 1;
         }
         /* TODO: check what happens with EG(included_files) */
     }
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 08:01:30 2024 UTC