wp_opcache_invalidate
wp_opcache_invalidate ( $filepath, $force = false )
Parameters:- (string) filepath Path to the file, including extension, for which the opcode cache is to be cleared.
- (bool) force Invalidate even if the modification time is not newer than the file in cache. Default false.
Links:Returns:- (bool) True if opcache was invalidated for `$filepath`, or there was nothing to invalidate. False if opcache invalidation is not available, or is disabled via filter.
Defined at: - Introduced in WordPress: 5.5.0
- Deprecated in WordPress: —
Description
Attempts to clear the opcode cache for an individual PHP file.This function can be called safely without having to check the file extension
or availability of the OPcache extension.
Whether or not invalidation is possible is cached to improve performance.