Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is realpath_cache in PHP?

Tags:

php

Can anyone tell me what exactly is meant by realpath_cache in PHP? Lots of references have been made to it in the PHP manual, but nothing explains it adequately. For example, the article on clearstatecache says that the parameter clear_realpath_cache denotes whether to clear the realpath cache or not. What is meant by this statement?

like image 423
SexyBeast Avatar asked Sep 06 '12 13:09

SexyBeast


People also ask

What is Realpath cache?

Realpath cache caches the real file system paths of filenames referenced instead of looking them up each time. Every time various file functions are performed or require a file and use a relative path, PHP has to look up where that file really exists.


1 Answers

realpath_cache is the system that allows php to cache paths to locations of files/directories you are using to minimize expensive disk lookups. It could possibly greatly improve performance of you PHP application/site if you use alot of relative file paths PHP has to parse/lookup each time you reference them.

like image 90
ChrisR Avatar answered Oct 09 '22 08:10

ChrisR