clearstatcache filesystem function clears cached file status

PHP maintains the status of files in internal cache. If we are using any of the file functions like is_file , is_readable , is_writable, filectime() etc then php stores the information returned by the applied function and if we try to use that same function on the same file in same script then php uses the cached value even if the file status changes in between two calls. But as any php script time is small only, but we have to keep this in mind while working on long running scripts. So if you are really working on such kind of script then you can use the php built in function to clear the php's internal cached information about the files.

Syntax
void clearstatcache(boolean $clear_real_path_cache(default FALSE),string $file_path)


first parameter : To clear real path cache or not.
second parameter : Use only when first parameter is TRUE.


some functions affected by clearstatcache()



0 comments:

Post a Comment

Post your helpful suggestions on this...

 
 
 

typo3 cms templates tutorial

PHP news

php freelancer mumbai India