|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-03-03 14:48 UTC] cmb@php.net
[2021-03-03 14:54 UTC] bjornar dot ness at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 02:00:02 2025 UTC |
Description: ------------ opcache_invalidate()/zend_accel_invalidate does: realpath = accelerator_orig_zend_resolve_path(filename, filename_len); if (!realpath) { return FAILURE; } accelerator_orig_zend_resolve_path ends up calling php_resolve_path that again does a tsrm_realpath() that ends up doing lstat() that in the end makes php_resolve_path return NULL and zend_accel_invalidate return FAILURE. This means it is not possible to invalidate a file that is removed from the filesystem without flushing the entire opcache. This can be problematic in general and for esoteric in particular. I understand the fact that one might try to resolve symlinks to find real cache key, but there should imho be a way to override this and enable the invalidation. Another related issue is that opcache_invalidate does not actually free up memory, just marks the cached code as corrupted. How impossible would it be to implement a opcache_delete call that would do all this?