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.


Top ↑

Source

File: wp-admin/includes/file.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.