From 6b3c8a6e6c4a018c0bc456d0a5d2443947761e1d Mon Sep 17 00:00:00 2001 From: Erica Douglass Date: Fri, 6 Sep 2002 06:43:13 +0000 Subject: [PATCH] Rewrote description of this function for clarity (check user notes -- no one knew what this function actually did. ;) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@94828 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../filesystem/functions/clearstatcache.xml | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/reference/filesystem/functions/clearstatcache.xml b/reference/filesystem/functions/clearstatcache.xml index eb9afedc1c..3e8781019b 100644 --- a/reference/filesystem/functions/clearstatcache.xml +++ b/reference/filesystem/functions/clearstatcache.xml @@ -1,10 +1,10 @@ - - + + clearstatcache - Clears file stat cache + Clears file status cache Description @@ -12,18 +12,20 @@ voidclearstatcache - - Invoking the stat or - lstat system call on most systems is - quite expensive. Therefore, the result of the last call to any of - the status functions (listed below) is stored for use on the next - such call using the same filename. If you wish to force a new - status check, for instance if the file is being checked many - times and may change or disappear, use this function to clear the - results of the last call from memory. + + When you use stat(), lstat(), or any of the other functions listed in the affected functions + list (below), PHP caches the information those functions return in order to provide faster + performance. However, in certain cases, you may want to clear the cached information. For + instance, if the same file is being checked multiple times within a single script, and that file + is in danger of being removed or changed during that script's operation, you may elect to clear the + status cache. In these cases, you can use the clearstatcache() function to clear the information that PHP caches about a file. - - This value is only cached for the lifetime of a single request. + + + This function caches information about specific filenames, so you only need to call clearstatcache() if + you are performing multiple operations on the same filename and require the information about that + particular file to not be cached. + Affected functions include stat,