WPDev.one
Core Function
View Source on Trac ↗

wp_opcache_invalidate()

wp_opcache_invalidate( mixed $filepath, mixed $force = false )

Attempts to clear the opcode cache for an individual PHP file.

Parameters 2 required

Name / Type Description
$filepath
string

Path to the file, including extension, for which the opcode cache is to be cleared.

Required
bool

$force Invalidate even if the modification time is not newer than the file in cache. Default false.

Required

Return Value

(bool)
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.

Function Information

Since Version
5.5.0
Source File
wp-admin/includes/file.php
Advertisement