clearstatcache

void clearstatcache(void) 

Clears cached file status.

Returns:

Nothing

Description:

Clears the cache created from calls to the stat() function. All functions that return file status information (such as file_exists(), filectime(), filesize(), and so on) use the stat() function to retrieve the needed information from the system. These calls are expensive in terms of resources; thus, to avoid a performance degrade, PHP caches the results of stat calls. Whenever any of the file status functions is used on a file for which information is already contained in the cache, the cached information is returned. The information may not be accurate, however, as the disk contents might have been changed. To force an update of the internal ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.