downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

realpath> <realpath_cache_get
[edit] Last updated: Fri, 25 May 2012

view this page in

realpath_cache_size

(PHP 5 >= 5.3.2)

realpath_cache_sizeRécupère la taille du cache realpath

Description

int realpath_cache_size ( void )

Récupère la quantité de mémoire utilisée par le cache realpath.

Valeurs de retour

Retourne la quantité de mémoire utilisée par le cache realpath.

Exemples

Exemple #1 Exemple avec realpath_cache_size()

<?php
var_dump
(realpath_cache_size());
?>

L'exemple ci-dessus va afficher quelque chose de similaire à :

int(412)

Voir aussi



add a note add a note User Contributed Notes realpath_cache_size
Stephen Pritchard from Arcanavision 13-Jan-2011 07:18
"realpath_cache_size" is used by PHP to cache the real file system paths of filenames referenced instead of looking them up each time.  Every time you perform any of the various file functions or include/require a file and use a relative path, PHP has to look up where that file really exists. PHP caches those values so it doesn’t have to search the current working directory and include_path for the file you are working on.
If your website uses lots of relative path files, think about increasing this value.  What value is required can be better estimated after monitoring by how fast the cache fills using realpath_cache_size() after restarting. Its contents can be viewed using realpath_cache_get().
superaap at gmail dot com 05-Nov-2010 04:41
Note that the realpath cache is not used if either safe_mode is on or an open_basedir restriction is in effect.
This is having a huge performance effect, causing lots of calls to lstat.

A bugreport has already been filed at http://bugs.php.net/bug.php?id=52312

 
show source | credits | stats | sitemap | contact | advertising | mirror sites