wp_opcache_invalidate_file WordPress Filter Hook
The wp_opcache_invalidate_file hook is called whenever a file is updated or deleted. It allows you to invalidate the cache for that file, so that the next time it is accessed, it will be reloaded from the server. This can be useful if you are making changes to a file that is cached by the server. By invalidating the cache, you can ensure that the changes you have made will be visible to everyone who accesses the file.
apply_filters( 'wp_opcache_invalidate_file', bool $will_invalidate , string $filepath ) #
Filters whether to invalidate a file from the opcode cache.
Parameters
- $will_invalidate
(bool)Whether WordPress will invalidate
$filepath
. Default true.- $filepath
(string)The path to the PHP file to invalidate.
Source
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |